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

Tilghman Lesher reviewboard at asterisk.org
Wed Jul 25 14:06:48 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.

A negative return value only stops applications on errors.  What this does is to tell the variable substitution routine to return a blank value.


> On July 25, 2012, 1:53 p.m., Kevin Fleming wrote:
> > /trunk/funcs/func_shell.c, line 98
> > <https://reviewboard.asterisk.org/r/2061/diff/1/?file=30591#file30591line98>
> >
> >     This loop is going to consume a rather large amount of CPU time since nothing in it will block.

Good point.  I should put ast_poll() in here to ensure that it waits for output, instead.


> 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.

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.


- Tilghman


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


On July 24, 2012, 10:50 a.m., Tilghman Lesher wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2061/
> -----------------------------------------------------------
> 
> (Updated July 24, 2012, 10:50 a.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/b1970d81/attachment.htm>


More information about the asterisk-dev mailing list