Explorar o código

Increase failed_dlgs when a non-2xx final response has been
received only.
(cherry picked from commit dd9681ce5f6602c888d847a283eaaf637318994d)

Timo Reimann %!s(int64=15) %!d(string=hai) anos
pai
achega
c074bd7c71
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      modules_k/dialog/dlg_handlers.c

+ 3 - 1
modules_k/dialog/dlg_handlers.c

@@ -397,6 +397,9 @@ static void dlg_onreply(struct cell* t, int type, struct tmcb_params *param)
 			unref_dlg(dlg,unref);
 		if (old_state==DLG_STATE_EARLY)
 			if_update_stat(dlg_enable_stats, early_dlgs, -1);
+
+		if_update_stat(dlg_enable_stats, failed_dlgs, 1);
+
 		return;
 	}
 
@@ -645,7 +648,6 @@ int dlg_new_dialog(struct sip_msg *msg, struct cell *t)
 error:
 	unref_dlg(dlg,1);
 	profile_cleanup(msg, 0, NULL);
-	update_stat(failed_dlgs, 1);
 	return -1;
 }