dect
/
asterisk
Archived
13
0
Fork 0

Exit from session loop upon error (ie: they disconnected) and don't do any buffer manipulation in do_message. get_input will handle it.

git-svn-id: http://svn.digium.com/svn/asterisk/trunk@50629 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
file 2007-01-12 18:13:50 +00:00
parent 9b1dfc49c6
commit 451d1a2d55
1 changed files with 1 additions and 6 deletions

View File

@ -2139,10 +2139,6 @@ static int do_message(struct mansession *s)
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))
@ -2200,8 +2196,7 @@ static void *session_do(void *data)
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 */