FS-6890 #please test
This commit is contained in:
parent
2b4082c236
commit
831832c2c6
|
@ -1 +1 @@
|
||||||
Fri Oct 31 13:48:09 CDT 2014
|
Tue Nov 4 18:30:40 CST 2014
|
||||||
|
|
|
@ -1544,36 +1544,46 @@ static void nua_session_usage_refresh(nua_handle_t *nh,
|
||||||
nua_client_request_t const *cr = du->du_cr;
|
nua_client_request_t const *cr = du->du_cr;
|
||||||
nua_server_request_t const *sr;
|
nua_server_request_t const *sr;
|
||||||
|
|
||||||
|
SU_DEBUG_3(("nua(%p): Checking Session Refresh\n", (void *)nh));
|
||||||
|
|
||||||
if (ss->ss_state >= nua_callstate_terminating ||
|
if (ss->ss_state >= nua_callstate_terminating ||
|
||||||
/* INVITE is in progress or being authenticated */
|
/* INVITE is in progress or being authenticated */
|
||||||
nua_client_request_in_progress(cr))
|
nua_client_request_in_progress(cr)) {
|
||||||
|
SU_DEBUG_3(("nua(%p): client has a request in progress\n", (void *)nh));
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* UPDATE has been queued */
|
/* UPDATE has been queued */
|
||||||
for (cr = ds->ds_cr; cr; cr = cr->cr_next)
|
for (cr = ds->ds_cr; cr; cr = cr->cr_next) {
|
||||||
if (cr->cr_method == sip_method_update)
|
if (cr->cr_method == sip_method_update) {
|
||||||
|
SU_DEBUG_3(("nua(%p): client has an update queued\n", (void *)nh));
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* INVITE or UPDATE in progress on server side */
|
/* INVITE or UPDATE in progress on server side */
|
||||||
for (sr = ds->ds_sr; sr; sr = sr->sr_next)
|
for (sr = ds->ds_sr; sr; sr = sr->sr_next) {
|
||||||
if (sr->sr_usage == du &&
|
if (sr->sr_usage == du &&
|
||||||
(sr->sr_method == sip_method_invite ||
|
(sr->sr_method == sip_method_invite ||
|
||||||
sr->sr_method == sip_method_update))
|
sr->sr_method == sip_method_update)) {
|
||||||
|
SU_DEBUG_3(("nua(%p): client has an INVITE OR UPDATE in progress\n", (void *)nh));
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (ss->ss_timer->refresher == nua_remote_refresher) {
|
if (ss->ss_timer->refresher == nua_remote_refresher) {
|
||||||
SU_DEBUG_3(("nua(%p): session almost expired, sending BYE before timeout.\n", (void *)nh));
|
SU_DEBUG_3(("nua(%p): session almost expired, sending BYE before timeout.\n", (void *)nh));
|
||||||
ss->ss_reason = "SIP;cause=408;text=\"Session timeout\"";
|
ss->ss_reason = "SIP;cause=408;text=\"Session timeout\"";
|
||||||
nua_stack_bye(nh->nh_nua, nh, nua_r_bye, NULL);
|
nua_stack_bye(nh->nh_nua, nh, nua_r_bye, NULL);
|
||||||
return;
|
return;
|
||||||
}
|
} else if (NH_PGET(nh, update_refresh)) {
|
||||||
else if (NH_PGET(nh, update_refresh)) {
|
SU_DEBUG_3(("nua(%p): STACK UPDATE\n", (void *)nh));
|
||||||
nua_stack_update(nh->nh_nua, nh, nua_r_update, NULL);
|
nua_stack_update(nh->nh_nua, nh, nua_r_update, NULL);
|
||||||
}
|
} else if (du->du_cr && du->du_cr->cr_method == sip_method_invite) {
|
||||||
else if (du->du_cr) {
|
SU_DEBUG_3(("nua(%p): RESEND REQUEST\n", (void *)nh));
|
||||||
nua_client_resend_request(du->du_cr, 0);
|
nua_client_resend_request(du->du_cr, 0);
|
||||||
}
|
} else {
|
||||||
else {
|
SU_DEBUG_3(("nua(%p): STACK INVITE\n", (void *)nh));
|
||||||
nua_stack_invite(nh->nh_nua, nh, nua_r_invite, NULL);
|
nua_stack_invite(nh->nh_nua, nh, nua_r_invite, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue