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

lib: Handle spdk_get_pdu() failure in spdk_iscsi_read_pdu()



Prepares spdk_iscsi_read_pdu() to handle the case where
spdk_get_pdu() will return NULL in a future patch instead
of abort()'ing.

Change-Id: I9ccfbf41821fb90a203fd8ad026f42fac10e9dbc
Signed-off-by: default avatarLance Hartmann <lance.hartmann@oracle.com>
Reviewed-on: https://review.gerrithub.io/403745


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 372c5e1e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -362,6 +362,9 @@ spdk_iscsi_read_pdu(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu **_pdu)

	if (conn->pdu_in_progress == NULL) {
		conn->pdu_in_progress = spdk_get_pdu();
		if (conn->pdu_in_progress == NULL) {
			return SPDK_ISCSI_CONNECTION_FATAL;
		}
	}

	pdu = conn->pdu_in_progress;