From: Jonathan Rose Date: Wed, 28 Nov 2012 16:23:47 +0000 (+0000) Subject: manager: Make challenge work with allowmultiplelogin=no X-Git-Tag: 1.8.20.0-rc1~24 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ac0111e30a5dd1c20c2938139b6fddc43fba20a6;p=thirdparty%2Fasterisk.git manager: Make challenge work with allowmultiplelogin=no Prior to this patch, challenge would yield a multiple logins error if used without providing the username (which isn't really supposed to be an argument to challenge) if allowmultiplelogin was set to no because allowmultiplelogin finds a user with a zero length login name. This check is simply disabled for the challenge action when the username is empty by this patch. (closes issue ASTERISK-20677) Reported by: Vladimir Patches: challenge_action_nomultiplelogin.diff uploaded by Jonathan Rose (license 6182) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@376725 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/manager.c b/main/manager.c index d9577a00cd..252c5c92b4 100644 --- a/main/manager.c +++ b/main/manager.c @@ -4696,7 +4696,7 @@ static int process_message(struct mansession *s, const struct message *m) || !strcasecmp(action, "Challenge"))) { user = astman_get_header(m, "Username"); - if (check_manager_session_inuse(user)) { + if (!ast_strlen_zero(user) && check_manager_session_inuse(user)) { report_session_limit(s); sleep(1); mansession_lock(s);