Module: kamailio
Branch: master
Commit: 23b4d93b9f8838298c7368d3efe8dae964426b50
URL:
https://github.com/kamailio/kamailio/commit/23b4d93b9f8838298c7368d3efe8dae…
Author: Jason Penton <jason.penton(a)gmail.com>
Committer: Jason Penton <jason.penton(a)gmail.com>
Date: 2015-02-05T16:51:46+02:00
modules/dialog_ng: changed stats to use native counters instead
- suggested by Olle
---
Modified: modules/dialog_ng/dlg_handlers.c
Modified: modules/dialog_ng/dlg_ng_stats.c
Modified: modules/dialog_ng/dlg_ng_stats.h
---
Diff:
https://github.com/kamailio/kamailio/commit/23b4d93b9f8838298c7368d3efe8dae…
Patch:
https://github.com/kamailio/kamailio/commit/23b4d93b9f8838298c7368d3efe8dae…
---
diff --git a/modules/dialog_ng/dlg_handlers.c b/modules/dialog_ng/dlg_handlers.c
index 4974e63..ff39104 100644
--- a/modules/dialog_ng/dlg_handlers.c
+++ b/modules/dialog_ng/dlg_handlers.c
@@ -556,6 +556,7 @@ static void dlg_onreply(struct cell* t, int type, struct tmcb_params
*param) {
ref_dlg(dlg, 1);
}
+ counter_add(dialog_ng_cnts_h.early, -1);
counter_inc(dialog_ng_counters_h.active);
run_dlg_callbacks(DLGCB_CONFIRMED, dlg, req, rpl, DLG_DIR_UPSTREAM, 0);
diff --git a/modules/dialog_ng/dlg_ng_stats.c b/modules/dialog_ng/dlg_ng_stats.c
index a55b7ed..bbfd961 100644
--- a/modules/dialog_ng/dlg_ng_stats.c
+++ b/modules/dialog_ng/dlg_ng_stats.c
@@ -2,7 +2,7 @@
struct dialog_ng_counters_h dialog_ng_cnts_h;
-/* sctp counters definitions */
+/* dialog_ng counters definitions */
counter_def_t dialog_ng_cnt_defs[] = {
{&dialog_ng_cnts_h.active, "active", 0, 0, 0,
"number of current active (answered) dialogs"},
diff --git a/modules/dialog_ng/dlg_ng_stats.h b/modules/dialog_ng/dlg_ng_stats.h
index 22619c0..b9ed67f 100644
--- a/modules/dialog_ng/dlg_ng_stats.h
+++ b/modules/dialog_ng/dlg_ng_stats.h
@@ -10,7 +10,8 @@ struct dialog_ng_counters_h {
counter_handle_t processed;
};
-#endif /* DIALOG_NG_STATS_H */
int dialog_ng_stats_init();
-void dialog_ng_stats_destroy();
\ No newline at end of file
+void dialog_ng_stats_destroy();
+
+#endif /* DIALOG_NG_STATS_H */
\ No newline at end of file