diff options
author | Kozlov Dmitry <xeb@mail.ru> | 2011-09-05 15:28:02 +0400 |
---|---|---|
committer | Kozlov Dmitry <xeb@mail.ru> | 2011-09-05 15:28:02 +0400 |
commit | 3e6a720a2cbd08edb6d04255b2246a833df6825c (patch) | |
tree | f273c6d460f98f83ffca94e44ac3d7b57ebb7445 /accel-pppd/radius/stat_accm.c | |
parent | 9739251101bffde2c62ba08c1869eb170d952d5b (diff) | |
download | accel-ppp-3e6a720a2cbd08edb6d04255b2246a833df6825c.tar.gz accel-ppp-3e6a720a2cbd08edb6d04255b2246a833df6825c.zip |
radius: per-server statistics
Diffstat (limited to 'accel-pppd/radius/stat_accm.c')
-rw-r--r-- | accel-pppd/radius/stat_accm.c | 13 |
1 files changed, 13 insertions, 0 deletions
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; |