Selaa lähdekoodia

dialog: Don't destroy dialogs in timer while they're still being referenced

Alex Hermann 11 vuotta sitten
vanhempi
commit
3eef4c8be5
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      modules/dialog/dlg_hash.c

+ 1 - 1
modules/dialog/dlg_hash.c

@@ -242,7 +242,7 @@ int dlg_clean_run(ticks_t ti)
 		while (dlg) {
 			tdlg = dlg;
 			dlg = dlg->next;
-			if(tdlg->state==DLG_STATE_UNCONFIRMED && tdlg->init_ts<tm-300) {
+			if(tdlg->state==DLG_STATE_UNCONFIRMED && tdlg->init_ts<tm-300 && tdlg->ref<=1) {
 				/* dialog in early state older than 5min */
 				LM_NOTICE("dialog in early state is too old (%p ref %d)\n",
 						tdlg, tdlg->ref);