Commit cb7661cd authored by Lance Hartmann's avatar Lance Hartmann Committed by Jim Harris
Browse files

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: default avatarLance Hartmann <lance.hartmann@oracle.com>
Reviewed-on: https://review.gerrithub.io/403857


Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 48fcd891
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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) {