From ec4eb766c70609b4e244ba970ea5203814a05bb9 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Thu, 16 Apr 2015 08:12:49 -0700 Subject: [PATCH] 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 --- lib/socket.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/socket.c b/lib/socket.c index 047a791..2965e32 100644 --- a/lib/socket.c +++ b/lib/socket.c @@ -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; }