From 56011190f7df52e5fa2e6db68438b741d0e27ca0 Mon Sep 17 00:00:00 2001 From: tilghman Date: Tue, 13 May 2008 18:36:13 +0000 Subject: If the socket dies (read returns 0=EOF), return immediately. (Closes issue #12637) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@115884 f38db490-d61c-443f-a65b-d21fe96a405b --- main/asterisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/asterisk.c b/main/asterisk.c index 37823e989..934a61731 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; } -- cgit v1.2.3