[sr-dev] git:master:3d88a551: pua_dialoginfo: don't free dlginfo structure in dlg loaded callback

Daniel-Constantin Mierla miconda at gmail.com
Tue Feb 2 09:19:38 CET 2016


Module: kamailio
Branch: master
Commit: 3d88a5516e0fb9693846831bf89786153f475192
URL: https://github.com/kamailio/kamailio/commit/3d88a5516e0fb9693846831bf89786153f475192

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2016-02-02T09:15:27+01:00

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/3d88a5516e0fb9693846831bf89786153f475192.diff
Patch: https://github.com/kamailio/kamailio/commit/3d88a5516e0fb9693846831bf89786153f475192.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