mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 12:36:58 +00:00
properly clear out manager header structure between actions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6701 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1357,7 +1357,7 @@ static void *session_do(void *data)
|
|||||||
ast_mutex_lock(&s->__lock);
|
ast_mutex_lock(&s->__lock);
|
||||||
ast_cli(s->fd, "Asterisk Call Manager/1.0\r\n");
|
ast_cli(s->fd, "Asterisk Call Manager/1.0\r\n");
|
||||||
ast_mutex_unlock(&s->__lock);
|
ast_mutex_unlock(&s->__lock);
|
||||||
memset(&m, 0, sizeof(&m));
|
memset(&m, 0, sizeof(m));
|
||||||
for (;;) {
|
for (;;) {
|
||||||
res = get_input(s, m.headers[m.hdrcount]);
|
res = get_input(s, m.headers[m.hdrcount]);
|
||||||
if (res > 0) {
|
if (res > 0) {
|
||||||
@@ -1368,7 +1368,7 @@ static void *session_do(void *data)
|
|||||||
if (ast_strlen_zero(m.headers[m.hdrcount])) {
|
if (ast_strlen_zero(m.headers[m.hdrcount])) {
|
||||||
if (process_message(s, &m))
|
if (process_message(s, &m))
|
||||||
break;
|
break;
|
||||||
memset(&m, 0, sizeof(&m));
|
memset(&m, 0, sizeof(m));
|
||||||
} else if (m.hdrcount < MAX_HEADERS - 1)
|
} else if (m.hdrcount < MAX_HEADERS - 1)
|
||||||
m.hdrcount++;
|
m.hdrcount++;
|
||||||
} else if (res < 0)
|
} else if (res < 0)
|
||||||
|
Reference in New Issue
Block a user