aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/symbols_cache.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-04-05 17:26:28 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-04-05 17:26:28 +0100
commit29bbf526f4e7d6fe31618901a753ee350fbe03d5 (patch)
treee9daa1dbccbb1789f75bfa8427e6d53f8a4fe20c /src/libserver/symbols_cache.c
parent5cb2fe96545d019d9a457f9be307eea165790b09 (diff)
downloadrspamd-29bbf526f4e7d6fe31618901a753ee350fbe03d5.tar.gz
rspamd-29bbf526f4e7d6fe31618901a753ee350fbe03d5.zip
[Feature] Add method to get number of symbols in the cache
Diffstat (limited to 'src/libserver/symbols_cache.c')
-rw-r--r--src/libserver/symbols_cache.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libserver/symbols_cache.c b/src/libserver/symbols_cache.c
index 862bd0f11..eea7f84b2 100644
--- a/src/libserver/symbols_cache.c
+++ b/src/libserver/symbols_cache.c
@@ -1710,6 +1710,14 @@ rspamd_symbols_cache_symbol_by_id (struct symbols_cache *cache,
return item->symbol;
}
+guint
+rspamd_symbols_cache_symbols_count (struct symbols_cache *cache)
+{
+ g_assert (cache != NULL);
+
+ return cache->items_by_id->len;
+}
+
void
rspamd_symbols_cache_disable_symbol (struct rspamd_task *task,
struct symbols_cache *cache, const gchar *symbol)