]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-3386
authorAnthony Minessale <anthm@freeswitch.org>
Sat, 16 Jul 2011 16:30:36 +0000 (11:30 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Sat, 16 Jul 2011 16:30:36 +0000 (11:30 -0500)
src/mod/endpoints/mod_sofia/mod_sofia.h
src/mod/endpoints/mod_sofia/sofia.c
src/mod/endpoints/mod_sofia/sofia_glue.c

index ec60df275de87196f22a9c07cd398a930535ca62..466597af1ada0259d3f61fc146ef42b952f1cd46 100644 (file)
@@ -159,8 +159,8 @@ struct sofia_private {
 
 #define set_param(ptr,val) if (ptr) {free(ptr) ; ptr = NULL;} if (val) {ptr = strdup(val);}
 #define set_anchor(t,m) if (t->Anchor) {delete t->Anchor;} t->Anchor = new SipMessage(m);
-//#define sofia_private_free(_pvt) if (_pvt && ! _pvt->is_static) {free(_pvt); _pvt = NULL;}
-#define sofia_private_free(_pvt) _pvt = NULL
+#define sofia_private_free(_pvt) if (_pvt && ! _pvt->is_static) {free(_pvt);} _pvt = NULL;
+
 
 /* Local Structures */
 /*************************************************************************************************************************************************************/
index a97d3a0b47b8b39ac49cc799e42601d7e17c8807..d54aa7896a94f8e3e9b7cd096a1fe1b34d57f39a 100644 (file)
@@ -1240,6 +1240,7 @@ void sofia_event_callback(nua_event_t event,
 
                memset(sofia_private, 0, sizeof(*sofia_private));
                sofia_private->is_call++;
+               sofia_private->is_static++;
                sofia_private->de = de;
                nua_handle_bind(nh, sofia_private);
                return;
index 4da775d6835c095f8c20f978f86b2439dc0d4245..c697e3cfe6084981811f2d49ce4b88f962c887a9 100644 (file)
@@ -2308,6 +2308,7 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
 
                memset(sofia_private, 0, sizeof(*sofia_private));
                sofia_private->is_call++;
+               sofia_private->is_static++;
 
                tech_pvt->sofia_private = sofia_private;
                switch_copy_string(tech_pvt->sofia_private->uuid, switch_core_session_get_uuid(session), sizeof(tech_pvt->sofia_private->uuid));