[asterisk-bugs] [JIRA] (ASTERISK-21324) [patch] Per-user option 'allowmultiplelogin' in manager

Matt Jordan (JIRA) noreply at issues.asterisk.org
Sat Jul 20 21:12:03 CDT 2013


    [ https://issues.asterisk.org/jira/browse/ASTERISK-21324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=208105#comment-208105 ] 

Matt Jordan commented on ASTERISK-21324:
----------------------------------------

Just as an FYI, it looks like you're missing a list unlock on the nominal path here:

{noformat}
+		if (!ast_strlen_zero(username) && check_manager_session_inuse(username)) {
+			AST_RWLIST_WRLOCK(&users);
+			user = get_manager_by_name_locked(username);
+			if(user && !user->allowmultiplelogin) {
+				AST_RWLIST_UNLOCK(&users);
+				report_session_limit(s);
+				sleep(1);
+				mansession_lock(s);
+				astman_send_error(s, m, "Login Already In Use");
+				mansession_unlock(s);
+				return -1;
+			}
 		}
{noformat}

I cleaned that up for the commit, and made a note of the behavioral improvements in the CHANGES file.  Thanks for the contribution!
                
> [patch] Per-user option 'allowmultiplelogin' in manager
> -------------------------------------------------------
>
>                 Key: ASTERISK-21324
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-21324
>             Project: Asterisk
>          Issue Type: New Feature
>      Security Level: None
>          Components: Core/ManagerInterface
>    Affects Versions: 11.2.1
>            Reporter: Vladimir Astafiev
>            Assignee: Matt Jordan
>            Severity: Minor
>         Attachments: asterisk-manager-per-user-allowmultiplelogin.patch
>
>
> Option 'allowmultiplelogin' can be set per-user. Global option value used by default.
> [Edit by Rusty Newton - adding excerpt from sample file for the already existing global option for those not familiar with it]
> {noformat}
> ;allowmultiplelogin = yes               ; IF set to no, rejects manager 
> logins that are already in use.
> ;                               ; The default is yes.
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list