[asterisk-bugs] [Asterisk 0013001]: [patch] Remove the 500ms delay trying to receive all CLI command output.

noreply at bugs.digium.com noreply at bugs.digium.com
Sun Jul 6 18:01:47 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13001 
====================================================================== 
Reported By:                eliel
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   13001
Category:                   Core/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 128342 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             07-06-2008 01:43 CDT
Last Modified:              07-06-2008 18:01 CDT
====================================================================== 
Summary:                    [patch] Remove the 500ms delay trying to receive all
CLI command output.
Description: 
I found this way to fix the 500ms delay in the polling that was increasing
the execution time of a 'asterisk -rx' command.
I created a command '_command nextislast' that is executed when 'asterisk
-rx' is being used to connect to the asterisk socket, and this command
tells asterisk that the next command within that console is the last, so
now asterisk is the responsible for closing the socket and we just wait for
all the output forever until the socket is closed.

====================================================================== 

---------------------------------------------------------------------- 
 eliel - 07-06-08 18:01  
---------------------------------------------------------------------- 
With this new CLI command, the remote console will be able to
close the connection at the exact moment that we finish receiving the
command output, and this was the issue that we didn't know how much time to
wait after receiving all the output, but:
if the remote console wants to continue connected will be able by just
running the normal commands, if it wants to loose the output is allow to
close the socket at any time also. So this situations are allow,  and are
handled by the remote console, we are giving this new command for the
clients that want to run a command, receive the output and disconnect
inmediatly. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
07-06-08 18:01  eliel          Note Added: 0089812                          
======================================================================




More information about the asterisk-bugs mailing list