diff options
author | Joshua Colp <jcolp@digium.com> | 2007-01-12 16:47:20 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2007-01-12 16:47:20 +0000 |
commit | c64ced140fdfada6d96794db1bb3944e4e0a2f41 (patch) | |
tree | a3d9ff30ebf3025ed894ad0c283ceb671c925c50 /main | |
parent | 17ea9c930e19d38670fff36f22ef783fd63ab202 (diff) |
Merged revisions 50602 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r50602 | file | 2007-01-12 11:42:33 -0500 (Fri, 12 Jan 2007) | 2 lines
We need to check for res being 0 in do_message itself, otherwise our headers will get lost.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@50603 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r-- | main/manager.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/main/manager.c b/main/manager.c index b154402f3..53b34dd19 100644 --- a/main/manager.c +++ b/main/manager.c @@ -2136,7 +2136,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; @@ -2198,10 +2200,8 @@ static void *session_do(void *data) ast_mutex_unlock(&s->__lock); for (;;) { res = do_message(s); - - if (res == 0) { - continue; - } else if (process_events(s)) + + if (process_events(s)) break; } /* session is over, explain why and terminate */ |