lib: Handle spdk_get_pdu() failure in spdk_iscsi_op_login()
Prepares spdk_iscsi_op_login() to handle the case where spdk_get_pdu() will return NULL in a future patch instead of abort()'ing. Change-Id: I95da4ff967667f6439330d7959c6937c55522e9a Signed-off-by: Lance Hartmann <lance.hartmann@oracle.com> Reviewed-on: https://review.gerrithub.io/403857 Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
48fcd89135
commit
cb7661cdec
@ -2216,6 +2216,9 @@ spdk_iscsi_op_login(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu)
|
||||
|
||||
|
||||
rsp_pdu = spdk_get_pdu();
|
||||
if (rsp_pdu == NULL) {
|
||||
return SPDK_ISCSI_CONNECTION_FATAL;
|
||||
}
|
||||
rc = spdk_iscsi_op_login_rsp_init(conn, pdu, rsp_pdu, params_p,
|
||||
&alloc_len, &cid);
|
||||
if (rc == SPDK_ISCSI_LOGIN_ERROR_RESPONSE || rc == SPDK_ISCSI_LOGIN_ERROR_PARAMETER) {
|
||||
|
Loading…
Reference in New Issue
Block a user