Commit e0a2de84 authored by Pekka Pessi's avatar Pekka Pessi

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

darcs-hash:20080306174710-65a35-84e4f42747c065e07b9e6e3cc239fd24128e1186.gz
parent f4776262
......@@ -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. */
......
......@@ -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 */
};
......
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