Thu Mar 6 12:47:10 EST 2008 Pekka.Pessi@nokia.com

* nua_dialog.[hc]: storing the last time refresh was requested in du_refquested



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7813 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2008-03-07 17:38:47 +00:00
parent a7be7d7156
commit 2b65396d6b
2 changed files with 7 additions and 3 deletions

View File

@ -512,6 +512,8 @@ void nua_dialog_usage_set_refresh_range(nua_dialog_usage_t *du,
SU_DEBUG_7(("nua(): refresh %s after %lu seconds (in [%u..%u])\n",
nua_dialog_usage_name(du), target - now, min, max));
du->du_refquested = now;
nua_dialog_usage_set_refresh_at(du, target);
}
@ -527,8 +529,10 @@ void nua_dialog_usage_set_refresh_at(nua_dialog_usage_t *du,
/**@internal Do not refresh. */
void nua_dialog_usage_reset_refresh(nua_dialog_usage_t *du)
{
if (du)
if (du) {
du->du_refquested = sip_now();
du->du_refresh = 0;
}
}
/** @internal Refresh usage. */

View File

@ -400,6 +400,8 @@ struct nua_dialog_usage {
nua_usage_class const *du_class;
nua_dialog_state_t *du_dialog;
nua_client_request_t *du_cr; /**< Client request bound with usage */
sip_time_t du_refquested; /**< When refreshed was requested */
sip_time_t du_refresh; /**< When to refresh */
unsigned du_ready:1; /**< Established usage */
unsigned du_shutdown:1; /**< Shutdown in progress */
@ -410,8 +412,6 @@ struct nua_dialog_usage {
* expiration time.
*/
sip_time_t du_refresh; /**< When to refresh */
sip_event_t const *du_event; /**< Event of usage */
};