From 2b65396d6b66356145678e0768c74264e77b8cdd Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Fri, 7 Mar 2008 17:38:47 +0000 Subject: [PATCH] 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 --- libs/sofia-sip/libsofia-sip-ua/nua/nua_dialog.c | 6 +++++- libs/sofia-sip/libsofia-sip-ua/nua/nua_dialog.h | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) 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 */ };