mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-20 08:40:16 +00:00
Move event processing into do_message so that it gets executed again when events are tripped.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@50895 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2059,6 +2059,11 @@ static int do_message(struct mansession *s)
|
|||||||
int res;
|
int res;
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
/* Check if any events are pending and do them if needed */
|
||||||
|
if (s->eventq->next) {
|
||||||
|
if (process_events(s))
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
res = get_input(s, header_buf);
|
res = get_input(s, header_buf);
|
||||||
if (res == 0) {
|
if (res == 0) {
|
||||||
continue;
|
continue;
|
||||||
@@ -2086,14 +2091,8 @@ static void *session_do(void *data)
|
|||||||
astman_append(s, "Asterisk Call Manager/1.0\r\n");
|
astman_append(s, "Asterisk Call Manager/1.0\r\n");
|
||||||
ast_mutex_unlock(&s->__lock);
|
ast_mutex_unlock(&s->__lock);
|
||||||
for (;;) {
|
for (;;) {
|
||||||
res = do_message(s);
|
if ((res = do_message(s)) < 0)
|
||||||
|
|
||||||
if (res < 0) {
|
|
||||||
break;
|
break;
|
||||||
} else if (s->eventq->next) {
|
|
||||||
if (process_events(s))
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (s->authenticated) {
|
if (s->authenticated) {
|
||||||
if (option_verbose > 1) {
|
if (option_verbose > 1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user