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/branches/1.4@50602 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Joshua Colp
2007-01-12 16:42:33 +00:00
parent 34b5a7c8ae
commit 5fe88c5f88

View File

@@ -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))