[asterisk-dev] [Code Review]: SHELLEX() dialplan function

Kevin Fleming reviewboard at asterisk.org
Wed Jul 25 14:46:03 CDT 2012



> On July 25, 2012, 1:53 p.m., Kevin Fleming wrote:
> > /trunk/funcs/func_shell.c, line 67
> > <https://reviewboard.asterisk.org/r/2061/diff/1/?file=30591#file30591line67>
> >
> >     Since this function can return an error code, I think it would be more useful if it did *not* stop dialplan execution on errors.
> 
> Tilghman Lesher wrote:
>     A negative return value only stops applications on errors.  What this does is to tell the variable substitution routine to return a blank value.

Ahh, of course. Thanks for the clue.


> On July 25, 2012, 1:53 p.m., Kevin Fleming wrote:
> > /trunk/funcs/func_shell.c, line 147
> > <https://reviewboard.asterisk.org/r/2061/diff/1/?file=30591#file30591line147>
> >
> >     What is this? This has nothing to do with ODBC.
> 
> Tilghman Lesher wrote:
>     This is a special variable that allows the HASH() dialplan function to work.  It's simply the names of the fields passed back in order.

Ouch. Bad choice of variable names then. Since this is an internal implementation detail, we should change it to ~HASHFIELDS~ for Asterisk 11.


- Kevin


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


On July 25, 2012, 2:17 p.m., Tilghman Lesher wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2061/
> -----------------------------------------------------------
> 
> (Updated July 25, 2012, 2:17 p.m.)
> 
> 
> Review request for Asterisk Developers and Kevin Fleming.
> 
> 
> Summary
> -------
> 
> Following a discussion about capturing the return value as well as the output of a command, I came up with this.
> 
> 
> Diffs
> -----
> 
>   /trunk/funcs/func_shell.c 370407 
> 
> Diff: https://reviewboard.asterisk.org/r/2061/diff
> 
> 
> Testing
> -------
> 
> Compile testing only
> 
> 
> Thanks,
> 
> Tilghman
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120725/4eb3f781/attachment-0001.htm>


More information about the asterisk-dev mailing list