[Freeswitch-svn] [commit] r7813 - freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua

Freeswitch SVN mikej at freeswitch.org
Fri Mar 7 12:38:47 EST 2008


Author: mikej
Date: Fri Mar  7 12:38:47 2008
New Revision: 7813

Modified:
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_dialog.c
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_dialog.h

Log:
Thu Mar  6 12:47:10 EST 2008  Pekka.Pessi at nokia.com
  * nua_dialog.[hc]: storing the last time refresh was requested in du_refquested



Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_dialog.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_dialog.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_dialog.c	Fri Mar  7 12:38:47 2008
@@ -512,6 +512,8 @@
   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 @@
 /**@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. */

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_dialog.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_dialog.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_dialog.h	Fri Mar  7 12:38:47 2008
@@ -400,6 +400,8 @@
   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 @@
    * expiration time.
    */
 
-  sip_time_t      du_refresh;		/**< When to refresh */
-
   sip_event_t const *du_event;		/**< Event of usage */
 
 };



More information about the Freeswitch-svn mailing list