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

Tilghman Lesher reviewboard at asterisk.org
Sun Oct 7 15:41:25 CDT 2012



> On Oct. 6, 2012, 1:34 p.m., Matt Jordan wrote:
> > /trunk/funcs/func_shell.c, lines 63-66
> > <https://reviewboard.asterisk.org/r/2061/diff/3/?file=30709#file30709line63>
> >
> >     If pipe fails, this will result in closing -1 in shellerr.  While that isn't a huge problem, it will result in failed system calls.

I'm not sure why a failed system call in this context is a problem.  I'm not detecting a failure because there is literally nothing that can be done about it.


> On Oct. 6, 2012, 1:34 p.m., Matt Jordan wrote:
> > /trunk/funcs/func_shell.c, line 73
> > <https://reviewboard.asterisk.org/r/2061/diff/3/?file=30709#file30709line73>
> >
> >     Granted it would be incredibly rare to not be able to open /dev/null, but we should still check for an error here.

Changed.


> On Oct. 6, 2012, 1:34 p.m., Matt Jordan wrote:
> > /trunk/funcs/func_shell.c, lines 75-77
> > <https://reviewboard.asterisk.org/r/2061/diff/3/?file=30709#file30709line75>
> >
> >     Check the return values of these as well.

Changed.


> On Oct. 6, 2012, 1:34 p.m., Matt Jordan wrote:
> > /trunk/funcs/func_shell.c, line 88
> > <https://reviewboard.asterisk.org/r/2061/diff/3/?file=30709#file30709line88>
> >
> >     Check for failed creation of errstr.  This also needs to be freed in the cleanup routine.

Added.


- Tilghman


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


On Oct. 7, 2012, 3:41 p.m., Tilghman Lesher wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2061/
> -----------------------------------------------------------
> 
> (Updated Oct. 7, 2012, 3:41 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_curl.c 374635 
>   /trunk/funcs/func_odbc.c 374635 
>   /trunk/funcs/func_realtime.c 374635 
>   /trunk/funcs/func_shell.c 374635 
>   /trunk/funcs/func_strings.c 374635 
> 
> 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/20121007/af7dfead/attachment.htm>


More information about the asterisk-dev mailing list