connect: invoke all callbacks for dropped PDUs

if we drop a PDU which has a callback we should invoke it otherwise
the caller may wait infinetely for a command completion.

Signed-off-by: Peter Lieven <pl@kamp.de>
This commit is contained in:
Peter Lieven
2016-03-17 11:55:46 +01:00
parent 97406c5b36
commit a7c94a7af5

View File

@@ -344,6 +344,10 @@ void iscsi_reconnect_cb(struct iscsi_context *iscsi _U_, int status,
* All other PDUs are discarded at this point.
* This includes DATA-OUT, NOP and task management.
*/
if (pdu->callback) {
pdu->callback(iscsi, SCSI_STATUS_CANCELLED,
NULL, pdu->private_data);
}
iscsi_free_pdu(old_iscsi, pdu);
continue;
}