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

Matt Jordan reviewboard at asterisk.org
Sat Oct 6 13:34:34 CDT 2012


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



/trunk/funcs/func_shell.c
<https://reviewboard.asterisk.org/r/2061/#comment13977>

    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.



/trunk/funcs/func_shell.c
<https://reviewboard.asterisk.org/r/2061/#comment13979>

    Granted it would be incredibly rare to not be able to open /dev/null, but we should still check for an error here.



/trunk/funcs/func_shell.c
<https://reviewboard.asterisk.org/r/2061/#comment13980>

    Check the return values of these as well.



/trunk/funcs/func_shell.c
<https://reviewboard.asterisk.org/r/2061/#comment13978>

    Check for failed creation of errstr.  This also needs to be freed in the cleanup routine.


- Matt


On July 28, 2012, 1:09 a.m., Tilghman Lesher wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2061/
> -----------------------------------------------------------
> 
> (Updated July 28, 2012, 1:09 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_curl.c 370533 
>   /trunk/funcs/func_odbc.c 370533 
>   /trunk/funcs/func_realtime.c 370533 
>   /trunk/funcs/func_shell.c 370533 
>   /trunk/funcs/func_strings.c 370533 
> 
> 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/20121006/4115d3e4/attachment.htm>


More information about the asterisk-dev mailing list