[Freeswitch-svn] [commit] r8182 - in freeswitch/trunk/libs/sofia-sip: . libsofia-sip-ua/nua

Freeswitch SVN mikej at freeswitch.org
Wed Apr 23 14:38:26 EDT 2008


Author: mikej
Date: Wed Apr 23 14:38:25 2008
New Revision: 8182

Modified:
   freeswitch/trunk/libs/sofia-sip/.update
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_notifier.c

Log:
Wed Apr 23 14:30:07 EDT 2008  first.last at nokia.com
  * nua_notifier.c: fixed crash with event fetch



Modified: freeswitch/trunk/libs/sofia-sip/.update
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/.update	(original)
+++ freeswitch/trunk/libs/sofia-sip/.update	Wed Apr 23 14:38:25 2008
@@ -1 +1 @@
-Wed Apr 23 14:36:09 EDT 2008
+Wed Apr 23 14:38:18 EDT 2008

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_notifier.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_notifier.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_notifier.c	Wed Apr 23 14:38:25 2008
@@ -340,7 +340,8 @@
 {
   nua_handle_t *nh = sr->sr_owner;
   nua_dialog_state_t *ds = nh->nh_ds;
-  struct notifier_usage *nu = nua_dialog_usage_private(sr->sr_usage);
+  nua_dialog_usage_t *du = sr->sr_usage;
+  struct notifier_usage *nu = nua_dialog_usage_private(du);
   enum nua_substate substate = nua_substate_terminated;
   int notify = 0;
   int retval;
@@ -365,16 +366,18 @@
     else 
 #endif
       notify = 1;
+
+    notify = notify && du->du_cr != NULL;
   }
 
   retval = nua_base_server_treport(sr, NUTAG_SUBSTATE(substate), TAG_END());
 
-  if (retval >= 2 || nu == NULL)
+  if (retval >= 2 || du == NULL)
     return retval;
   
   if (notify) {
     /* Send NOTIFY (and terminate subscription, when needed) */
-    nua_dialog_usage_refresh(nh, ds, sr->sr_usage, sip_now());
+    nua_dialog_usage_refresh(nh, ds, du, sip_now());
   }
   
   return retval;



More information about the Freeswitch-svn mailing list