Browse code

core: k statistics counter api update

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

Andrei Pelinescu-Onciul authored on 09/08/2010 14:59:57
Showing 1 changed files
... ...
@@ -62,9 +62,12 @@ int register_stat( char *module, char *name, stat_var **pvar, int flags)
62 62
 	cnt_flags = (flags & STAT_NO_RESET) ? CNT_F_NO_RESET : 0;
63 63
 	if (flags & STAT_IS_FUNC)
64 64
 		ret = counter_register(&h, module, name, cnt_flags,
65
-					cnt_cbk_wrapper,(stat_function)pvar , 0);
65
+					cnt_cbk_wrapper,(stat_function)pvar,
66
+					"kamailio statistic (no description)",
67
+					0);
66 68
 	else
67
-		ret = counter_register(&h, module, name, cnt_flags, 0, 0, 0);
69
+		ret = counter_register(&h, module, name, cnt_flags, 0, 0,
70
+					"kamailio statistic (no description)", 0);
68 71
 	if (ret < 0) {
69 72
 		if (ret == -2)
70 73
 			ERR("counter %s.%s already registered\n", module, name);