[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 13:32:24 CDT 2008
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=12637
======================================================================
Reported By: karvan
Assigned To: Corydon76
======================================================================
Project: Asterisk
Issue ID: 12637
Category: General
Reproducibility: always
Severity: minor
Priority: normal
Status: closed
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:
Resolution: fixed
Fixed in Version:
======================================================================
Date Submitted: 05-13-2008 10:33 CDT
Last Modified: 05-13-2008 13:32 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;
}
======================================================================
----------------------------------------------------------------------
svnbot - 05-13-08 13:32
----------------------------------------------------------------------
Repository: asterisk
Revision: 115886
_U trunk/
U trunk/main/asterisk.c
------------------------------------------------------------------------
r115886 | tilghman | 2008-05-13 13:32:20 -0500 (Tue, 13 May 2008) | 11
lines
Merged revisions 115884 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r115884 | tilghman | 2008-05-13 13:36:13 -0500 (Tue, 13 May 2008) | 3
lines
If the socket dies (read returns 0=EOF), return immediately.
(Closes issue http://bugs.digium.com/view.php?id=12637)
........
------------------------------------------------------------------------
http://svn.digium.com/view/asterisk?view=rev&revision=115886
Issue History
Date Modified Username Field Change
======================================================================
05-13-08 13:32 svnbot Checkin
05-13-08 13:32 svnbot Note Added: 0086805
======================================================================
More information about the asterisk-bugs
mailing list