Commit 91ddb79f authored by Pekka Pessi's avatar Pekka Pessi

Using su_root_yield() in nea_server.c, nta.c, nua_stack.c.

darcs-hash:20060724182410-65a35-07e8c2b6314fabd9dde9cba8827aa22040b2ef7f.gz
parent 5fcc10b3
......@@ -2347,6 +2347,7 @@ void nes_event_timer(nea_server_t *srvr,
nea_server_t *nes = (nea_server_t *) arg;
sip_time_t now = sip_now();
nea_sub_t *s = NULL, *s_next = NULL;
su_root_t *root = su_timer_root(timer);
su_timer_set(timer, nes_event_timer, nes);
......@@ -2357,8 +2358,11 @@ void nes_event_timer(nea_server_t *srvr,
s_next = s->s_next;
if (s->s_state == nea_terminated)
continue;
if ((int)(now - s->s_expires) >= 0)
nea_sub_notify(nes, s, now, TAG_END());
if ((int)(now - s->s_expires) >= 0) {
nea_sub_notify(nes, s, now, TAG_END());
/* Yield so we can handle received packets */
su_root_yield(root);
}
}
if (--nes->nes_in_list == 0 && nes->nes_pending_flush)
......
......@@ -7264,6 +7264,8 @@ int outgoing_timer(nta_agent_t *sa, su_duration_t now)
outgoing_set_timer(orq, 2 * orq->orq_interval);
else
outgoing_set_timer(orq, sa->sa_t2);
su_root_yield(sa->sa_root); /* Handle received packets */
}
terminated
......
......@@ -461,6 +461,7 @@ void nua_stack_timer(nua_t *nua, su_timer_t *t, su_timer_arg_t *a)
{
nua_handle_t *nh, *nh_next;
sip_time_t now = sip_now();
su_root_t *root = su_timer_root(t);
su_timer_set(t, nua_stack_timer, a);
......@@ -472,6 +473,7 @@ void nua_stack_timer(nua_t *nua, su_timer_t *t, su_timer_arg_t *a)
for (nh = nua->nua_handles; nh; nh = nh_next) {
nh_next = nh->nh_next;
nh_call_pending(nh, now);
su_root_yield(root); /* Handle received packets */
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment