[sr-dev] git:4:385d9be8: dialog: don't update dlg vars in db if in deleted state

Daniel-Constantin Mierla miconda at gmail.com
Thu Oct 1 16:53:33 CEST 2015


Module: kamailio
Branch: 4
Commit: 385d9be8ed45f378c52c7d4f1220f517f5605831
URL: https://github.com/kamailio/kamailio/commit/385d9be8ed45f378c52c7d4f1220f517f5605831

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2015-10-01T16:53:09+02:00

dialog: don't update dlg vars in db if in deleted state

- dlg record and vars are scheduled for deletion

(cherry picked from commit 6620fe7b0963ffe0e2c0d4ab7a38e85d1dfd121d)

---

Modified: modules/dialog/dlg_db_handler.c

---

Diff:  https://github.com/kamailio/kamailio/commit/385d9be8ed45f378c52c7d4f1220f517f5605831.diff
Patch: https://github.com/kamailio/kamailio/commit/385d9be8ed45f378c52c7d4f1220f517f5605831.patch

---

diff --git a/modules/dialog/dlg_db_handler.c b/modules/dialog/dlg_db_handler.c
index aaa8ff4..5dddd63 100644
--- a/modules/dialog/dlg_db_handler.c
+++ b/modules/dialog/dlg_db_handler.c
@@ -711,8 +711,8 @@ int update_dialog_dbinfo_unsafe(struct dlg_cell * cell)
 			&sflags_column,      &toroute_name_column,     &req_uri_column,
 			&xdata_column, &iflags_column };
 
-	if(cell->state<DLG_STATE_EARLY) {
-		LM_DBG("not storing dlg in db during initial state\n");
+	if(cell->state<DLG_STATE_EARLY || cell->state==DLG_STATE_DELETED) {
+		LM_DBG("not storing dlg in db during initial or deleted states\n");
 		return 0;
 	}
 




More information about the sr-dev mailing list