diff options
author | Alexander Couzens <lynxis@fe80.eu> | 2017-12-05 16:06:27 +0100 |
---|---|---|
committer | Alexander Couzens <lynxis@fe80.eu> | 2017-12-05 16:06:27 +0100 |
commit | 18ba26cfab4a07b8f45aeb7f28b4f8faabc6a2e7 (patch) | |
tree | 46b1c5557548cfe31288c1b9611c05d78b1edcab /src | |
parent | ad1797e359f95b3a9ff57bfc92217d4f4f96fc95 (diff) |
counters: add osmo_counters_count() returns the amount of counters
Change-Id: I9068231d71876e06d27ee67a688d7fb611ac3a1b
Diffstat (limited to 'src')
-rw-r--r-- | src/counter.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/counter.c b/src/counter.c index 0fa84c8f..0fa31661 100644 --- a/src/counter.c +++ b/src/counter.c @@ -77,6 +77,13 @@ int osmo_counters_for_each(int (*handle_counter)(struct osmo_counter *, void *), return rc; } +/*! Counts the registered counter + * \returns amount of counters */ +int osmo_counters_count() +{ + return llist_count(&counters); +} + /*! Find a counter by its name. * \param[in] name Name used to look-up/search counter * \returns Counter on success; NULL if not found */ |