From: Tilghman Lesher Date: Tue, 13 May 2008 18:36:13 +0000 (+0000) Subject: If the socket dies (read returns 0=EOF), return immediately. X-Git-Tag: 1.4.20-rc3~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2fc71fe5635300526b0ad9bbcbc60da2b102d6a1;p=thirdparty%2Fasterisk.git If the socket dies (read returns 0=EOF), return immediately. (Closes issue #12637) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115884 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/asterisk.c b/main/asterisk.c index 37823e9891..934a617317 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -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; }