[asterisk-bugs] [Asterisk 0012637]: Giving remote command halts if asterisk process stops

noreply at bugs.digium.com noreply at bugs.digium.com
Tue May 13 10:33:58 CDT 2008


The following issue has been SUBMITTED. 
====================================================================== 
http://bugs.digium.com/view.php?id=12637 
====================================================================== 
Reported By:                karvan
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   12637
Category:                   General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           1.4.20 
SVN Branch (only for SVN checkouts, not tarball releases):  1.4  
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             05-13-2008 10:33 CDT
Last Modified:              05-13-2008 10:33 CDT
====================================================================== 
Summary:                    Giving remote command halts if asterisk process
stops
Description: 
When giving a command through the remote interface (ie 'rasterisk -x' or
'asterisk -rx') the process will get stuck in a loop if the original
asterisk process stops.

This happens at least with 'stop now', 'restart' and 'reload'.

Simple apply the following patch to fix this:

--- asterisk-1.4/main/asterisk.c     2008-05-09 12:50:30.000000000 +0300
+++ asterisk-fixed/main/asterisk.c     2008-05-13 18:26:09.000000000
+0300
@@ -2307,7 +2307,7 @@
                        char buf[512] = "", *curline = buf, *nextline;
                        int not_written = 1;

-                       if (read(ast_consock, buf, sizeof(buf) - 1) < 0)
{
+                       if (read(ast_consock, buf, sizeof(buf) - 1) <= 0)
{
                                break;
                        }

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

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
05-13-08 10:33  karvan         Asterisk Version          => 1.4.20          
05-13-08 10:33  karvan         SVN Branch (only for SVN checkou =>  1.4         
  
======================================================================




More information about the asterisk-bugs mailing list