[asterisk-dev] [Code Review] HELP - Find the bug :: Dialplan function for manager account checks - AMI_CLIENT()

Joshua Colp jcolp at digium.com
Tue Nov 3 13:35:39 CST 2009


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/421/#review1239
-----------------------------------------------------------


There you go.


/trunk/main/manager.c
<https://reviewboard.asterisk.org/r/421/#comment2869>

    Since this exists in the core you need to call:
    
    __ast_custom_function_register(&managerclient_function, NULL);
    
    Which will disable automatic module reference counting. ast_custom_function_register is actually there so that modules have the right thing happen automatically.


- Joshua


On 2009-11-03 13:20:19, Olle E Johansson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/421/
> -----------------------------------------------------------
> 
> (Updated 2009-11-03 13:20:19)
> 
> 
> 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
> -------
> 
> The 1.4 version works and is in production. This version is not tested at all, in fact it's very bad - as soon as you start Asterisk it crashes. Wonderful candidate for review, right? :-)
> 
> The core doesn't say more than the fact that the crash is in the function registration call in manager.c. Makes me wonder if it's just too early for Asterisk to register functions for some reason.
> 
> PLEASE HELP ME FIND THE BUG! 
> 
> I'm going crazy... It's propably very easy when you see my bad code and see the mistake and laugh at my efforts... Feel free to name it "worst code of the month in reviewboard" - as long as you direct me to where it's faulty...
> 
> Thanks
> /Olle
> 
> 
> Thanks,
> 
> Olle E
> 
>




More information about the asterisk-dev mailing list