[asterisk-commits] file: trunk r50629 - /trunk/main/manager.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Fri Jan 12 11:13:50 MST 2007
Author: file
Date: Fri Jan 12 12:13:50 2007
New Revision: 50629
URL: http://svn.digium.com/view/asterisk?view=rev&rev=50629
Log:
Exit from session loop upon error (ie: they disconnected) and don't do any buffer manipulation in do_message. get_input will handle it.
Modified:
trunk/main/manager.c
Modified: trunk/main/manager.c
URL: http://svn.digium.com/view/asterisk/trunk/main/manager.c?view=diff&rev=50629&r1=50628&r2=50629
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Fri Jan 12 12:13:50 2007
@@ -2139,10 +2139,6 @@
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 @@
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 */
More information about the asterisk-commits
mailing list