diff --git a/libs/sofia-sip/libsofia-sip-ua/nua/nua_dialog.c b/libs/sofia-sip/libsofia-sip-ua/nua/nua_dialog.c index 18c7bb7e20..e52316bbd1 100644 --- a/libs/sofia-sip/libsofia-sip-ua/nua/nua_dialog.c +++ b/libs/sofia-sip/libsofia-sip-ua/nua/nua_dialog.c @@ -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. */ diff --git a/libs/sofia-sip/libsofia-sip-ua/nua/nua_dialog.h b/libs/sofia-sip/libsofia-sip-ua/nua/nua_dialog.h index 5e1ba48567..064c90d67e 100644 --- a/libs/sofia-sip/libsofia-sip-ua/nua/nua_dialog.h +++ b/libs/sofia-sip/libsofia-sip-ua/nua/nua_dialog.h @@ -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 */ };