[sr-dev] git:master:a41eab6b: dialog: proper handling of dlg_set_timeout() for not confirmed dialogs

Daniel-Constantin Mierla miconda at gmail.com
Wed Jan 7 22:03:22 CET 2015


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2015-01-07T22:02:56+01:00

dialog: proper handling of dlg_set_timeout() for not confirmed dialogs

---

Modified: modules/dialog/dlg_hash.c

---

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

---

diff --git a/modules/dialog/dlg_hash.c b/modules/dialog/dlg_hash.c
index 0d8fdca..134626a 100644
--- a/modules/dialog/dlg_hash.c
+++ b/modules/dialog/dlg_hash.c
@@ -1076,12 +1076,14 @@ int dlg_set_toroute(struct dlg_cell *dlg, str *route)
 
 int	update_dlg_timeout(dlg_cell_t *dlg, int timeout)
 {
-	if(update_dlg_timer(&dlg->tl, timeout) < 0) {
-		LM_ERR("failed to update dialog lifetime\n");
-		dlg_release(dlg);
-		return -1;
-	} 
-
+	if(dlg->state!=DLG_STATE_UNCONFIRMED
+			&& dlg->state!=DLG_STATE_EARLY) {
+		if(update_dlg_timer(&dlg->tl, timeout) < 0) {
+			LM_ERR("failed to update dialog lifetime\n");
+			dlg_release(dlg);
+			return -1;
+		}
+	}
 	dlg->lifetime = timeout;
 	dlg->dflags |= DLG_FLAG_CHANGED;
 




More information about the sr-dev mailing list