mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-13 07:45:26 +00:00
Thu Apr 16 12:04:08 CDT 2009 Pekka Pessi <first.last@nokia.com>
* nua_client, nua_session: avoid restarting in-progress transactions This is supposed to fix bugs #SFSIP-135 and #SFSIP-137. Thanks for Tamas Jalsovszky and kawarod for reporting the problem. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13062 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
5278050e61
commit
59478dd599
@ -1 +1 @@
|
||||
Thu Apr 16 10:00:29 CDT 2009
|
||||
Thu Apr 16 12:18:30 CDT 2009
|
||||
|
@ -413,6 +413,20 @@ int nua_client_bind(nua_client_request_t *cr, nua_dialog_usage_t *du)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** Check if client request is in progress.
|
||||
*
|
||||
* A client request is in progress, if
|
||||
* 1) it has actual transaction going on
|
||||
* 2) it is waiting credentials from application
|
||||
* 3) it is waiting for Retry-After timer
|
||||
*/
|
||||
int
|
||||
nua_client_request_in_progress(nua_client_request_t const *cr)
|
||||
{
|
||||
return cr &&
|
||||
(cr->cr_orq || cr->cr_wait_for_cred || cr->cr_timer);
|
||||
}
|
||||
|
||||
/**Initialize client request for sending.
|
||||
*
|
||||
* This function is called when the request is taken from queue and sent.
|
||||
@ -1564,7 +1578,7 @@ int nua_client_next_request(nua_client_request_t *cr, int invite)
|
||||
break;
|
||||
}
|
||||
|
||||
if (cr && cr->cr_orq == NULL) {
|
||||
if (cr && !nua_client_request_in_progress(cr)) {
|
||||
nua_client_init_request(cr);
|
||||
}
|
||||
|
||||
|
@ -250,6 +250,8 @@ su_inline int nua_client_is_queued(nua_client_request_t const *cr)
|
||||
return cr && cr->cr_prev;
|
||||
}
|
||||
|
||||
int nua_client_request_in_progress(nua_client_request_t const *cr);
|
||||
|
||||
int nua_client_request_complete(nua_client_request_t *cr);
|
||||
int nua_client_request_remove(nua_client_request_t *cr);
|
||||
int nua_client_request_clean(nua_client_request_t *cr);
|
||||
|
@ -1535,7 +1535,7 @@ static void nua_session_usage_refresh(nua_handle_t *nh,
|
||||
|
||||
if (ss->ss_state >= nua_callstate_terminating ||
|
||||
/* INVITE is in progress or being authenticated */
|
||||
(cr && (cr->cr_orq || cr->cr_wait_for_cred)))
|
||||
nua_client_request_in_progress(cr))
|
||||
return;
|
||||
|
||||
/* UPDATE has been queued */
|
||||
|
Loading…
x
Reference in New Issue
Block a user