#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 */
/*************************************************************************************************************************************************************/
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;
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));