Browse Source

modules/dialog: Do not send BYE request for non-confirmed dialogs
(not supported).
(cherry picked from commit 4a84c8c410ce45d9e5443eb52ac4c79e47ab5f3c)

Timo Reimann 15 years ago
parent
commit
983411fa3d
1 changed files with 6 additions and 0 deletions
  1. 6 0
      modules_k/dialog/dlg_req_within.c

+ 6 - 0
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;