[Pkg-iscsi-maintainers] [open-iscsi] 19/33: iscsiadm: return error when login fails

Ritesh Raj Sarraf rrs at alioth.debian.org
Tue Nov 5 16:21:16 UTC 2013


This is an automated email from the git hooks/post-receive script.

rrs pushed a commit to branch upstream-mnc
in repository open-iscsi.

commit fc2a8e9a2911bc76f961fe3e4a159fab9b8b9691
Author: Lee Duncan <lduncan at suse.com>
Date:   Fri Mar 8 11:11:13 2013 -0800

    iscsiadm: return error when login fails
    
    When login fails because there are too many sessions we should be
    returning an error code so that userland is aware that something
    is amiss.
    
    Signed-off-by: Hannes Reinecke <hare at suse.com>
    Signed-off-by: Lee Duncan <lduncan at suse.com>
---
 usr/session_mgmt.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/usr/session_mgmt.c b/usr/session_mgmt.c
index ec1f43a..0b7373f 100644
--- a/usr/session_mgmt.c
+++ b/usr/session_mgmt.c
@@ -178,12 +178,12 @@ int iscsi_login_portal(void *data, struct list_head *list, struct node_rec *rec)
 		goto done;
 	}
 	if (session_count >= rec->session.nr_sessions) {
-		log_debug(1, "%s: %d session%s requested, but %d "
+		log_warning("%s: %d session%s requested, but %d "
 			  "already present.",
 			  rec->iface.name, rec->session.nr_sessions,
 			  rec->session.nr_sessions == 1 ? "" : "s",
 			  session_count);
-		rc = 0;
+		rc = ISCSI_ERR_SESS_EXISTS;
 		goto done;
 	}
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-iscsi/open-iscsi.git



More information about the Pkg-iscsi-maintainers mailing list