Summary: | ASTERISK-21324: [patch] Per-user option 'allowmultiplelogin' in manager | ||
Reporter: | Vladimir Astafiev (vldmr) | Labels: | |
Date Opened: | 2013-03-27 08:34:14 | Date Closed: | 2013-07-20 21:16:03 |
Priority: | Minor | Regression? | |
Status: | Closed/Complete | Components: | Core/ManagerInterface |
Versions: | 11.2.1 | Frequency of Occurrence | |
Related Issues: | |||
Environment: | Attachments: | ( 0) asterisk-manager-per-user-allowmultiplelogin.patch | |
Description: | 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} | ||
Comments: | By: Michael L. Young (elguero) 2013-03-27 10:49:57.542-0500 Features requests are no longer submitted to or accepted through the issue tracker. Features requests are openly discussed on the mailing lists [1] and Asterisk IRC channels and made note of by Bug Marshals. [1] http://www.asterisk.org/support/mailing-lists By: Matt Jordan (mjordan) 2013-03-27 11:20:32.518-0500 He did attach a patch, it just doesn't show up yet (license pending) By: Michael L. Young (elguero) 2013-03-27 12:03:15.997-0500 Woops... sorry about that. It wasn't obvious by the comments or the title of the issue. I usually check if there was anything attached and failed to do so on this one. By: Rusty Newton (rnewton) 2013-04-09 18:57:50.495-0500 Vladimir this looks like the first time you have submitted a patch. Be sure to read through https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines#AsteriskIssueGuidelines-PatchandCodesubmission and review your code against the coding guidelines. That'll make sure that when an Asterisk dev gets a chance to review it that things go quickly. Thanks for the contribution! By: Matt Jordan (mjordan) 2013-07-20 21:10:51.938-0500 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! |