]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-4079 try this
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 7 Aug 2012 22:23:01 +0000 (17:23 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 7 Aug 2012 22:23:01 +0000 (17:23 -0500)
src/mod/endpoints/mod_sofia/sofia.c

index 99f42169f1823635a564d2905e1a7eb3493ca35b..08f06866255373e1a0fd343a9174662b7df3e1f4 100644 (file)
@@ -972,7 +972,13 @@ static void our_sofia_event_callback(nua_event_t event,
        if (sofia_private && sofia_private->is_call && sofia_private->de) {
                sofia_dispatch_event_t *qde = sofia_private->de;
                sofia_private->de = NULL;
-               sofia_process_dispatch_event(&qde);
+
+               if (event == nua_i_cancel) {
+                       nua_destroy_event(qde->event);
+                       su_free(nh->nh_home, qde);      
+               } else {
+                       sofia_process_dispatch_event(&qde);
+               }
        }
 
        profile->last_sip_event = switch_time_now();