Module: kamailio
Branch: 5.0
Commit: 89585896ed388f492b357218d66abf6b2c42e496
URL:
https://github.com/kamailio/kamailio/commit/89585896ed388f492b357218d66abf6…
Author: Henning Westerholt <hw(a)kamailio.org>
Committer: Henning Westerholt <hw(a)kamailio.org>
Date: 2018-06-19T22:34:31+02:00
dialog: dlg stats incremented twice (ported from git master 9317175c71c2c4a613)
(cherry picked from commit d8800d458386a7e35a523f33886f3b148697fa46)
---
Modified: src/modules/dialog/dialog.c
Modified: src/modules/dialog/dlg_db_handler.c
---
Diff:
https://github.com/kamailio/kamailio/commit/89585896ed388f492b357218d66abf6…
Patch:
https://github.com/kamailio/kamailio/commit/89585896ed388f492b357218d66abf6…
---
diff --git a/src/modules/dialog/dialog.c b/src/modules/dialog/dialog.c
index 56ef5a473a..6baf7ddaf4 100644
--- a/src/modules/dialog/dialog.c
+++ b/src/modules/dialog/dialog.c
@@ -121,8 +121,6 @@ str empty_str = STR_NULL;
/* statistic variables */
int dlg_enable_stats = 1;
-int active_dlgs_cnt = 0;
-int early_dlgs_cnt = 0;
int detect_spirals = 1;
int dlg_send_bye = 0;
int dlg_timeout_noreset = 0;
@@ -733,11 +731,6 @@ static int child_init(int rank)
}
}
- if (rank==1) {
- if_update_stat(dlg_enable_stats, active_dlgs, active_dlgs_cnt);
- if_update_stat(dlg_enable_stats, early_dlgs, early_dlgs_cnt);
- }
-
if ( ((dlg_db_mode==DB_MODE_REALTIME || dlg_db_mode==DB_MODE_DELAYED) &&
(rank>0 || rank==PROC_TIMER || rank==PROC_RPC)) ||
(dlg_db_mode==DB_MODE_SHUTDOWN && (rank==PROC_MAIN)) ) {
diff --git a/src/modules/dialog/dlg_db_handler.c b/src/modules/dialog/dlg_db_handler.c
index f4f7448327..0b9d77ce89 100644
--- a/src/modules/dialog/dlg_db_handler.c
+++ b/src/modules/dialog/dlg_db_handler.c
@@ -80,8 +80,6 @@ static db1_con_t* dialog_db_handle = 0; /* database connection handle
*/
static db_func_t dialog_dbf;
extern int dlg_enable_stats;
-extern int active_dlgs_cnt;
-extern int early_dlgs_cnt;
#define SET_STR_VALUE(_val, _str)\
@@ -376,10 +374,8 @@ static int load_dialog_info_from_db(int dlg_hash_size, int
fetch_num_rows)
dlg->state = VAL_INT(values+8);
if (dlg->state==DLG_STATE_CONFIRMED_NA ||
dlg->state==DLG_STATE_CONFIRMED) {
- active_dlgs_cnt++;
if_update_stat(dlg_enable_stats, active_dlgs, 1);
} else if (dlg->state==DLG_STATE_EARLY) {
- early_dlgs_cnt++;
if_update_stat(dlg_enable_stats, early_dlgs, 1);
}