git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@50629
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
if (res == 0) {
continue;
} else if (res > 0) {
- /* Strip trailing \r\n */
- if (strlen(header_buf) < 2)
- continue;
- header_buf[strlen(header_buf) - 2] = '\0';
if (ast_strlen_zero(header_buf))
return process_message(s, &m) ? -1 : 0;
else if (m.hdrcount < (AST_MAX_MANHEADERS - 1))
ast_mutex_unlock(&s->__lock);
for (;;) {
res = do_message(s);
-
- if (process_events(s))
+ if ((res < 0) || (process_events(s)))
break;
}
/* session is over, explain why and terminate */