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

Terry Wilson reviewboard at asterisk.org
Wed Apr 18 22:03:08 CDT 2012


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

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/95cddf64/attachment.htm>


More information about the asterisk-dev mailing list