[sr-dev] git:andrei/counters: core: k statistics counter api update

Andrei Pelinescu-Onciul andrei at iptel.org
Mon Aug 9 17:11:23 CEST 2010


Module: sip-router
Branch: andrei/counters
Commit: 83fc52f0d894a0b0e5a7e895391bd9f0dfdb203a
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=83fc52f0d894a0b0e5a7e895391bd9f0dfdb203a

Author: Andrei Pelinescu-Onciul <andrei at iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei at iptel.org>
Date:   Mon Aug  9 16:59:57 2010 +0200

core: k statistics counter api update

counter_register() takes now an extra parameter (description).

---

 lib/kcore/kstats_wrapper.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/kcore/kstats_wrapper.c b/lib/kcore/kstats_wrapper.c
index 076fbf9..4feeebb 100644
--- a/lib/kcore/kstats_wrapper.c
+++ b/lib/kcore/kstats_wrapper.c
@@ -62,9 +62,12 @@ int register_stat( char *module, char *name, stat_var **pvar, int flags)
 	cnt_flags = (flags & STAT_NO_RESET) ? CNT_F_NO_RESET : 0;
 	if (flags & STAT_IS_FUNC)
 		ret = counter_register(&h, module, name, cnt_flags,
-					cnt_cbk_wrapper,(stat_function)pvar , 0);
+					cnt_cbk_wrapper,(stat_function)pvar,
+					"kamailio statistic (no description)",
+					0);
 	else
-		ret = counter_register(&h, module, name, cnt_flags, 0, 0, 0);
+		ret = counter_register(&h, module, name, cnt_flags, 0, 0,
+					"kamailio statistic (no description)", 0);
 	if (ret < 0) {
 		if (ret == -2)
 			ERR("counter %s.%s already registered\n", module, name);




More information about the sr-dev mailing list