[asterisk-dev] [Code Review] Patch adds ability to ami hangup to specify a regex pattern to match channels against

opticron reviewboard at asterisk.org
Wed Mar 28 15:42:10 CDT 2012


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



trunk/main/manager.c
<https://reviewboard.asterisk.org/r/1827/#comment10813>

    The documentation implies that the trailing / is required, but the return is not checked.



trunk/main/manager.c
<https://reviewboard.asterisk.org/r/1827/#comment10816>

    Was it still a success if no channels were hungup?



trunk/main/manager.c
<https://reviewboard.asterisk.org/r/1827/#comment10815>

    It would be prudent to include a list of the channels that were hungup here.



trunk/main/manager.c
<https://reviewboard.asterisk.org/r/1827/#comment10814>

    This doesn't need to be in an else since execution can't actually escape the if block.  I suggest inverting the logic so that the non-regex case is in the if block and the more heavily indented code can be dropped down a level.


- opticron


On March 25, 2012, 4:55 p.m., kobaz wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1827/
> -----------------------------------------------------------
> 
> (Updated March 25, 2012, 4:55 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> Patch adds ability to ami hangup to specify a regex pattern to match channels against
> 
> 
> This addresses bug ASTERISK-19575.
>     https://issues.asterisk.org/jira/browse/ASTERISK-19575
> 
> 
> Diffs
> -----
> 
>   trunk/include/asterisk/channel.h 360459 
>   trunk/include/asterisk/strings.h 360459 
>   trunk/main/channel.c 360459 
>   trunk/main/manager.c 360459 
>   trunk/main/utils.c 360459 
> 
> Diff: https://reviewboard.asterisk.org/r/1827/diff
> 
> 
> Testing
> -------
> 
> Action:   Hangup
> UseRegex: Yes
> Channel:  Local/foo.*
> 
> Action:   Hangup
> UseRegex: Yes
> Channel:  SIP/foo.*
> 
> 
> Thanks,
> 
> kobaz
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120328/1e4581ac/attachment.htm>


More information about the asterisk-dev mailing list