]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
If the socket dies (read returns 0=EOF), return immediately.
authorTilghman Lesher <tilghman@meg.abyt.es>
Tue, 13 May 2008 18:36:13 +0000 (18:36 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Tue, 13 May 2008 18:36:13 +0000 (18:36 +0000)
(Closes issue #12637)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115884 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/asterisk.c

index 37823e9891a97dc3a36303a78885cf14be3fd1bc..934a61731735ea201d8b541fac29a733d5da1424 100644 (file)
@@ -2307,7 +2307,7 @@ static void ast_remotecontrol(char * data)
                        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;
                        }