reconnect: improve error message is reconnect is disabled

if reconnect is disabled then a failure in iscsi_service_reconnect_if_loggedin
can leak back to the application by iscsi_service returning an error
but the error string is not being updated.
Thus the applucation will print the last prevous error message that was set.

Change iscsi_service_reconnect_if_loggedin to print a less confusing
error message.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
This commit is contained in:
Ronnie Sahlberg
2015-04-16 08:12:49 -07:00
parent cfac4c5d55
commit ec4eb766c7

View File

@@ -785,6 +785,8 @@ iscsi_service_reconnect_if_loggedin(struct iscsi_context *iscsi)
}
return 0;
}
iscsi_set_error(iscsi, "iscsi_service_reconnect_if_loggedin. Can not "
"reconnect right now.\n");
return -1;
}