Module: sip-router Branch: andrei/counters Commit: a719d6ae7f9b2227ab483600d8979561b49b32ba URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a719d6ae...
Author: Andrei Pelinescu-Onciul andrei@iptel.org Committer: Andrei Pelinescu-Onciul andrei@iptel.org Date: Mon Aug 9 16:51:36 2010 +0200
core: counters arrays and counters descriptions
- each counter must have a description / help string. - allow null handles in counter_register(). - counters arrays can be used to conveniently describe and register several counters in the same time. E.g.: counter_def_t my_counters_defs[] = { {&h1, "counter1", 0, 0, 0, "test counter1"}, {&h2, "counter2", 0, 0, 0, "test counter2"}, {0, "counter3", 0, get_cbk, 0, "counter with callback"}, {0, 0, 0, 0, 0, 0} };
counter_register_array("my_counters", my_counters_defs);
---
counters.c | 96 +++++++++++++++++++++++++++++++++++++++++++++++------------ counters.h | 38 ++++++++++++++++++++---- 2 files changed, 108 insertions(+), 26 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=a719...