[asterisk-dev] [Code Review] Dialplan function for manager account checks - AMI_CLIENT()
Russell Bryant
russell at digium.com
Tue Nov 3 15:50:16 CST 2009
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/421/#review1244
-----------------------------------------------------------
/trunk/main/manager.c
<https://reviewboard.asterisk.org/r/421/#comment2886>
Since the operation being performed on each session is so small, it would actually be more efficient to implement this as an ao2_callback().
/trunk/main/manager.c
<https://reviewboard.asterisk.org/r/421/#comment2885>
You have an init() without a destroy(). This will result in a reference leak on the sessions container.
/trunk/main/manager.c
<https://reviewboard.asterisk.org/r/421/#comment2883>
The use of if (!strcasecmp(...)) is more common than == 0.
- Russell
On 2009-11-03 14:48:56, Olle E Johansson wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/421/
> -----------------------------------------------------------
>
> (Updated 2009-11-03 14:48:56)
>
>
> Review request for Asterisk Developers.
>
>
> Summary
> -------
>
> Implementation of a dialplan function for checking manager accounts. I've made it extensible so that we can add other parameters when needed. Right now it only checks the number of logged in sessions for a manager account.
>
>
> Diffs
> -----
>
> /trunk/main/manager.c 227348
>
> Diff: https://reviewboard.asterisk.org/r/421/diff
>
>
> Testing
> -------
>
> Tested on my Linux system and it reports manager logins properly - 0, 1 and 2 concurrent sessions...
>
>
> Thanks,
>
> Olle E
>
>
More information about the asterisk-dev
mailing list