modules/dialog: Do not send BYE request for non-confirmed dialogs
authorTimo Reimann <timo.reimann@1und1.de>
Tue, 13 Jul 2010 11:21:40 +0000 (13:21 +0200)
committerTimo Reimann <timo.reimann@1und1.de>
Tue, 13 Jul 2010 11:21:40 +0000 (13:21 +0200)
  (not supported).

modules_k/dialog/dlg_req_within.c

index 9be5c51..aae12fd 100644 (file)
@@ -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;