[sr-dev] git:4.3:11715a36: pua_dialoginfo: don't free dlginfo structure in dlg loaded callback

Phil Lavin phil.lavin at synety.com
Tue Mar 1 08:48:34 CET 2016


Module: kamailio
Branch: 4.3
Commit: 11715a3601629d8f1b79cac4f84f7e0ebebd318e
URL: https://github.com/kamailio/kamailio/commit/11715a3601629d8f1b79cac4f84f7e0ebebd318e

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Phil Lavin <phil.lavin at synety.com>
Date: 2016-02-24T08:40:43Z

pua_dialoginfo: don't free dlginfo structure in dlg loaded callback

- the structure will be destroyed in a later dlg callback, enabled by
  dlg_api.register_dlgcb(), via free_dlginfo_cell()
- based and includes partial patch from GH #492, by Phil Lavin

---

Modified: modules/pua_dialoginfo/pua_dialoginfo.c

---

Diff:  https://github.com/kamailio/kamailio/commit/11715a3601629d8f1b79cac4f84f7e0ebebd318e.diff
Patch: https://github.com/kamailio/kamailio/commit/11715a3601629d8f1b79cac4f84f7e0ebebd318e.patch

---

diff --git a/modules/pua_dialoginfo/pua_dialoginfo.c b/modules/pua_dialoginfo/pua_dialoginfo.c
index de53e0f..446d980 100644
--- a/modules/pua_dialoginfo/pua_dialoginfo.c
+++ b/modules/pua_dialoginfo/pua_dialoginfo.c
@@ -609,7 +609,11 @@ __dialog_loaded(struct dlg_cell *dlg, int type, struct dlg_cb_params *_params)
 	LM_DBG("INVITE dialog loaded: from=%.*s\n", dlg->from_uri.len, dlg->from_uri.s);
 
 	dlginfo=get_dialog_data(dlg, type);
-	if(dlginfo!=NULL) free_dlginfo_cell(dlginfo);
+	if(dlginfo!=NULL) {
+		LM_DBG("dialog info initialized (from=%.*s)\n",
+				dlg->from_uri.len, dlg->from_uri.s);
+		/* free_dlginfo_cell(dlginfo); */
+	}
 }
 
 




More information about the sr-dev mailing list