Browse code

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

Timo Reimann authored on 13/07/2010 11:21:40
Showing 1 changed files
... ...
@@ -236,6 +236,12 @@ error:
236 236
  */
237 237
 static inline int send_bye(struct dlg_cell * cell, int dir, str *hdrs)
238 238
 {
239
+	/* do not send BYE request for non-confirmed dialogs (not supported) */
240
+	if (cell->state != DLG_STATE_CONFIRMED_NA && cell->state != DLG_STATE_CONFIRMED) {
241
+		LM_ERR("terminating non-confirmed dialogs not supported\n");
242
+		return -1;
243
+	}
244
+
239 245
 	/*verify direction*/
240 246
 	uac_req_t uac_r;
241 247
 	dlg_t* dialog_info;