@@ -337,7 +337,10 @@ iscsi_destroy_context(struct iscsi_context *iscsi)
|
|||||||
ISCSI_LOG(iscsi,5,"memory is clean at iscsi_destroy_context() after %d mallocs, %d realloc(s), %d free(s) and %d reused small allocations",iscsi->mallocs,iscsi->reallocs,iscsi->frees,iscsi->smallocs);
|
ISCSI_LOG(iscsi,5,"memory is clean at iscsi_destroy_context() after %d mallocs, %d realloc(s), %d free(s) and %d reused small allocations",iscsi->mallocs,iscsi->reallocs,iscsi->frees,iscsi->smallocs);
|
||||||
}
|
}
|
||||||
|
|
||||||
iscsi_destroy_context(iscsi->old_iscsi);
|
if (iscsi->old_iscsi) {
|
||||||
|
iscsi->old_iscsi->fd = -1;
|
||||||
|
iscsi_destroy_context(iscsi->old_iscsi);
|
||||||
|
}
|
||||||
|
|
||||||
memset(iscsi, 0, sizeof(struct iscsi_context));
|
memset(iscsi, 0, sizeof(struct iscsi_context));
|
||||||
free(iscsi);
|
free(iscsi);
|
||||||
|
|||||||
@@ -1304,6 +1304,7 @@ struct iscsi_in_pdu *in)
|
|||||||
iscsi_adjust_maxexpcmdsn(iscsi, in);
|
iscsi_adjust_maxexpcmdsn(iscsi, in);
|
||||||
|
|
||||||
iscsi->is_loggedin = 0;
|
iscsi->is_loggedin = 0;
|
||||||
|
ISCSI_LOG(iscsi, 2, "logout successful");
|
||||||
pdu->callback(iscsi, SCSI_STATUS_GOOD, NULL, pdu->private_data);
|
pdu->callback(iscsi, SCSI_STATUS_GOOD, NULL, pdu->private_data);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -377,7 +377,7 @@ iscsi_disconnect(struct iscsi_context *iscsi)
|
|||||||
|
|
||||||
close(iscsi->fd);
|
close(iscsi->fd);
|
||||||
|
|
||||||
if (iscsi->connected_portal[0]) {
|
if (!iscsi->pending_reconnect && iscsi->connected_portal[0]) {
|
||||||
ISCSI_LOG(iscsi, 2, "disconnected from portal %s",iscsi->connected_portal);
|
ISCSI_LOG(iscsi, 2, "disconnected from portal %s",iscsi->connected_portal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user