From 91701367ad7f2a2ac7c35ea9ed796b0a4a2a0b12 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Thu, 12 Sep 2019 18:01:35 +0200 Subject: Added function to count subscriptions --- common/subscriptions.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'common/subscriptions.c') diff --git a/common/subscriptions.c b/common/subscriptions.c index 9c8c345..529c339 100644 --- a/common/subscriptions.c +++ b/common/subscriptions.c @@ -38,3 +38,8 @@ void common_subscriptions_const_walk(const struct subscription* subscriptions, v func(sub); } } + +size_t common_subscriptions_count(const struct subscription* subscriptions) +{ + return HASH_COUNT(subscriptions); +} -- cgit v1.2.3