[sr-dev] git:master: modules/dialog: Do not send BYE request for non-confirmed dialogs

Timo Reimann timo.reimann at 1und1.de
Tue Jul 13 13:23:17 CEST 2010


Module: sip-router
Branch: master
Commit: 4a84c8c410ce45d9e5443eb52ac4c79e47ab5f3c
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=4a84c8c410ce45d9e5443eb52ac4c79e47ab5f3c

Author: Timo Reimann <timo.reimann at 1und1.de>
Committer: Timo Reimann <timo.reimann at 1und1.de>
Date:   Tue Jul 13 13:21:40 2010 +0200

modules/dialog: Do not send BYE request for non-confirmed dialogs
  (not supported).

---

 modules_k/dialog/dlg_req_within.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/modules_k/dialog/dlg_req_within.c b/modules_k/dialog/dlg_req_within.c
index 9be5c51..aae12fd 100644
--- a/modules_k/dialog/dlg_req_within.c
+++ b/modules_k/dialog/dlg_req_within.c
@@ -236,6 +236,12 @@ error:
  */
 static inline int send_bye(struct dlg_cell * cell, int dir, str *hdrs)
 {
+	/* do not send BYE request for non-confirmed dialogs (not supported) */
+	if (cell->state != DLG_STATE_CONFIRMED_NA && cell->state != DLG_STATE_CONFIRMED) {
+		LM_ERR("terminating non-confirmed dialogs not supported\n");
+		return -1;
+	}
+
 	/*verify direction*/
 	uac_req_t uac_r;
 	dlg_t* dialog_info;




More information about the sr-dev mailing list