[asterisk-dev] [Code Review] Create STACK_PEEK to view calling context, extension, and priority

Terry Wilson reviewboard at asterisk.org
Thu Mar 8 11:54:47 CST 2012


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



/trunk/apps/app_stack.c
<https://reviewboard.asterisk.org/r/1776/#comment10565>

    Document the options passable to 'which'.



/trunk/apps/app_stack.c
<https://reviewboard.asterisk.org/r/1776/#comment10562>

    ast_channel_datastore_find() requires channel locking.



/trunk/apps/app_stack.c
<https://reviewboard.asterisk.org/r/1776/#comment10563>

    coding guidelines (as much as I personally like one-line while statements, they are verboten). Also, I think args.which = ast_skip_blanks(args.which) would be better anyway.



/trunk/res/ael/pval.c
<https://reviewboard.asterisk.org/r/1776/#comment10569>

    I don't like anything about this block. I don't like creating magic contexts/extensions in the first place, and I really don't like including them in every single (ael) context. This very well could be related to my hatred of AEL in general, though, so I am going to have defer reviewing this part of the code to someone who is more familiar with AEL.



/trunk/res/ael/pval.c
<https://reviewboard.asterisk.org/r/1776/#comment10568>

    You have ast_get_context_name possibly returning NULL and then passing that to strcmp without checking for NULL.


- Terry


On March 8, 2012, 1:39 a.m., Tilghman Lesher wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1776/
> -----------------------------------------------------------
> 
> (Updated March 8, 2012, 1:39 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> The issue in question wants variables similar to how Macro worked, which presented variables in the dialplan to denote the calling context, extension, and priority.  This might be similarly set by AEL, except that AEL doesn't have the information to pass at the right time.  It has the information before the call to Gosub is made, but it needs to be passed into the Gosub, so it can be saved on the stack (and thus correctly disappear, restoring previous values, when Return is executed.  Thus, STACK_PEEK was born, with the intention of being able to mimic features in 1.4's AEL that are not present anymore.
> 
> Whether this goes into a version of Asterisk earlier than 11 is a case for the bug reporter to make.
> 
> 
> This addresses bug ASTERISK-19336.
>     https://issues.asterisk.org/jira/browse/ASTERISK-19336
> 
> 
> Diffs
> -----
> 
>   /trunk/apps/app_stack.c 358080 
>   /trunk/funcs/func_dialplan.c 358080 
>   /trunk/res/ael/pval.c 358080 
>   /trunk/tests/test_gosub.c 358080 
>   /trunk/utils/ael_main.c 358080 
>   /trunk/utils/conf2ael.c 358080 
> 
> Diff: https://reviewboard.asterisk.org/r/1776/diff
> 
> 
> Testing
> -------
> 
> Added test cases to test_gosub, in the process discovering another bug that has since been fixed.  Works as designed.
> 
> 
> Thanks,
> 
> Tilghman
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120308/5045c58c/attachment.htm>


More information about the asterisk-dev mailing list