git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@50895
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
int res;
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);
if (res == 0) {
continue;
astman_append(s, "Asterisk Call Manager/1.0\r\n");
ast_mutex_unlock(&s->__lock);
for (;;) {
- res = do_message(s);
-
- if (res < 0) {
+ if ((res = do_message(s)) < 0)
break;
- } else if (s->eventq->next) {
- if (process_events(s))
- break;
- }
}
if (s->authenticated) {
if (option_verbose > 1) {