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 <h...@suse.com> Signed-off-by: Lee Duncan <ldun...@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; } -- 1.7.10.4 -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscr...@googlegroups.com. To post to this group, send email to open-iscsi@googlegroups.com. Visit this group at http://groups.google.com/group/open-iscsi?hl=en. For more options, visit https://groups.google.com/groups/opt_out.