[asterisk-dev] [Code Review] Fix the handling of multiple CLI commands via socket

wdoekes reviewboard at asterisk.org
Thu Apr 19 02:24:32 CDT 2012


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

Ship it!


Looks good to me. Some minor comments:


/branches/1.8/main/asterisk.c
<https://reviewboard.asterisk.org/r/1876/#comment11046>

    char *const end_buf = inbuf + sizeof(inbuf);



/branches/1.8/main/asterisk.c
<https://reviewboard.asterisk.org/r/1876/#comment11045>

    /* ast_cli_command_multiple_full will only process individual commands terminated by a NULL and not trailing partial commands. */


- wdoekes


On April 18, 2012, 10:03 p.m., Terry Wilson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1876/
> -----------------------------------------------------------
> 
> (Updated April 18, 2012, 10:03 p.m.)
> 
> 
> Review request for Asterisk Developers and wdoekes.
> 
> 
> Summary
> -------
> 
> The Asterisk netconsole treated read data as containing complete commands as opposed to the data stream that it is. This patch, inspired by wdoekes patch, handles receiving multiple commands by moving incomplete commands back to the beginning of the buffer and appending to them.
> 
> There is still an issue with handling "cli quit after ..." with multiple commands, but I'm not really sure it is worth the effort to fix it. Very few people have tried to use the netconsole for sending multiple commands in a single connection anyway. If they want to use "cli quite after" they can continue to do it in a separate connection. 
> 
> 
> This addresses bug ASTERISK-18308.
>     https://issues.asterisk.org/jira/browse/ASTERISK-18308
> 
> 
> Diffs
> -----
> 
>   /branches/1.8/main/asterisk.c 362360 
> 
> Diff: https://reviewboard.asterisk.org/r/1876/diff
> 
> 
> Testing
> -------
> 
> Lots of running the script on the issue for various numbers of commands of various lengths.
> 
> 
> Thanks,
> 
> Terry
> 
>

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


More information about the asterisk-dev mailing list