diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-01-12 16:42:33 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-01-12 16:42:33 +0000 |
commit | 556f44ae495ad855194025f44c7115da93562859 (patch) | |
tree | b64c9ccce45205227de4fb278dfbe496ac0bf8c0 /main/manager.c | |
parent | 3e99604f7b7b5cf40a37173fa383112cfecba6d7 (diff) |
We need to check for res being 0 in do_message itself, otherwise our headers will get lost.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@50602 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/manager.c')
-rw-r--r-- | main/manager.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/main/manager.c b/main/manager.c index edad0d3fe..3761754a5 100644 --- a/main/manager.c +++ b/main/manager.c @@ -2060,7 +2060,9 @@ static int do_message(struct mansession *s) for (;;) { res = get_input(s, header_buf); - if (res > 0) { + if (res == 0) { + continue; + } else if (res > 0) { /* Strip trailing \r\n */ if (strlen(header_buf) < 2) continue; @@ -2086,9 +2088,7 @@ static void *session_do(void *data) for (;;) { res = do_message(s); - if (res == 0) { - continue; - } else if (res < 0) { + if (res < 0) { break; } else if (s->eventq->next) { if (process_events(s)) |