[sr-dev] git:master:a463c53e: statsc: debug message when fetching stats values

Daniel-Constantin Mierla miconda at gmail.com
Thu Oct 24 12:39:18 CEST 2019


Module: kamailio
Branch: master
Commit: a463c53e767114567ff25f0fe50115da0e3d0045
URL: https://github.com/kamailio/kamailio/commit/a463c53e767114567ff25f0fe50115da0e3d0045

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2019-10-24T12:38:51+02:00

statsc: debug message when fetching stats values

---

Modified: src/modules/statsc/statsc_mod.c

---

Diff:  https://github.com/kamailio/kamailio/commit/a463c53e767114567ff25f0fe50115da0e3d0045.diff
Patch: https://github.com/kamailio/kamailio/commit/a463c53e767114567ff25f0fe50115da0e3d0045.patch

---

diff --git a/src/modules/statsc/statsc_mod.c b/src/modules/statsc/statsc_mod.c
index 0cbe246965..fcedfcdeef 100644
--- a/src/modules/statsc/statsc_mod.c
+++ b/src/modules/statsc/statsc_mod.c
@@ -257,6 +257,7 @@ void statsc_timer(unsigned int ticks, void *param)
 	statsc_nmap_t *sm = NULL;
 	time_t tn;
 	int n;
+	int i;
 
 	if(_statsc_info==NULL || _statsc_info->slist==NULL) {
 		LM_ERR("statsc not initialized\n");
@@ -270,8 +271,12 @@ void statsc_timer(unsigned int ticks, void *param)
 	LM_DBG("statsc timer - time: %lu - ticks: %u - index: %d - steps: %llu\n",
 			(unsigned long)tn, ticks, n, (unsigned long long)_statsc_info->steps);
 
+	i = 0;
 	for(sm=_statsc_info->slist->next; sm!=NULL; sm=sm->next) {
+		LM_DBG("fetching value for: [%.*s] - step [%d]\n", sm->rname.len,
+				sm->rname.s, i);
 		statsc_svalue(&sm->rname, sm->vals + n);
+		i++;
 	}
 	_statsc_info->steps++;
 }




More information about the sr-dev mailing list