diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-05-13 18:36:13 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-05-13 18:36:13 +0000 |
commit | 56011190f7df52e5fa2e6db68438b741d0e27ca0 (patch) | |
tree | 3d0624980bc199c9cd83ff6d4a2e50b49a0351bd /main/asterisk.c | |
parent | 20f9deee601232907f4409f8756e5227fd78a95c (diff) |
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
Diffstat (limited to 'main/asterisk.c')
-rw-r--r-- | main/asterisk.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |