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
This commit is contained in:
Joshua Colp
2007-01-12 16:47:20 +00:00
parent 17ea9c930e
commit c64ced140f

View File

@@ -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 */