Summary:ASTERISK-04381: [patch] Fix for app_queue "Queues" manager action; output not properly terminated
Reporter:davetroy (davetroy)Labels:
Date Opened:2005-06-09 08:37:37Date Closed:2008-01-15 15:37:49.000-0600
Versions:Frequency of
Environment:Attachments:( 0) app_queue.c.diff
( 1) chan_iax2.c.diff
Description:There are several instances where cli command callbacks have been made accessible via the manager interface.  In such cases, the output usually does not comply with the manager conventions, (i.e. name: value pairs, and \r\n\r\n termination).  This tends to be hard for clients to digest and breaks things that count on \r\n\r\n as a block delimiter.

While I consider the lack of name: value output to be poor form, the lack of \r\n\r\n as termination is worse, since apps cannot really tell when output is complete.  If we are going to pass through cli output directly, we should perhaps consider adding a terminating name: value output of some kind as well.

Anyway, attached is a fix for the output of "Action: Queues" that just adds a \r\n\r\n. I know there are other places where this is a problem.  Would ask that people be on the lookout for them and make similar fixes.  I will submit as I find them as well.

This behavior specifically hinders the stateful manager proxy (astmanproxy) concept and has come up in relation to its deployment.

Disclaimer on file, etc.
Comments:By: davetroy (davetroy) 2005-06-09 10:01:11

Same problem exists in chan_iax2.c (JDG, I am watching you. :) )  See attached patch.

By: Kevin P. Fleming (kpfleming) 2005-06-09 15:32:18

Committed to CVS HEAD, thanks!

By: Digium Subversion (svnbot) 2008-01-15 15:37:49.000-0600

Repository: asterisk
Revision: 5884

U   trunk/apps/app_queue.c
U   trunk/channels/chan_iax2.c

r5884 | kpfleming | 2008-01-15 15:37:48 -0600 (Tue, 15 Jan 2008) | 2 lines

ensure CLI commands produce proper terminating output when used with manager interface (bug ASTERISK-4381)