Browse Source

core: k statistics counter api update

counter_register() takes now an extra parameter (description).
Andrei Pelinescu-Onciul 15 years ago
parent
commit
83fc52f0d8
1 changed files with 5 additions and 2 deletions
  1. 5 2
      lib/kcore/kstats_wrapper.c

+ 5 - 2
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;
 	cnt_flags = (flags & STAT_NO_RESET) ? CNT_F_NO_RESET : 0;
 	if (flags & STAT_IS_FUNC)
 	if (flags & STAT_IS_FUNC)
 		ret = counter_register(&h, module, name, cnt_flags,
 		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
 	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 < 0) {
 		if (ret == -2)
 		if (ret == -2)
 			ERR("counter %s.%s already registered\n", module, name);
 			ERR("counter %s.%s already registered\n", module, name);