From 3e6a720a2cbd08edb6d04255b2246a833df6825c Mon Sep 17 00:00:00 2001 From: Kozlov Dmitry Date: Mon, 5 Sep 2011 15:28:02 +0400 Subject: radius: per-server statistics --- accel-pppd/radius/stat_accm.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'accel-pppd/radius/stat_accm.c') diff --git a/accel-pppd/radius/stat_accm.c b/accel-pppd/radius/stat_accm.c index 34935a15..2388c5d3 100644 --- a/accel-pppd/radius/stat_accm.c +++ b/accel-pppd/radius/stat_accm.c @@ -35,6 +35,19 @@ struct stat_accm_t *stat_accm_create(unsigned int time) return s; } +void stat_accm_free(struct stat_accm_t *s) +{ + struct item_t *it; + + while (!list_empty(&s->items)) { + it = list_entry(s->items.next, typeof(*it), entry); + list_del(&it->entry); + mempool_free(it); + } + + _free(s); +} + static void stat_accm_clean(struct stat_accm_t *s) { struct item_t *it; -- cgit v1.2.3