aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/radix.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-05-13 14:03:46 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-05-13 14:03:46 +0100
commit2d94c35b631d5d74bba56037a406bb125181e623 (patch)
treea60dbcc989b7b3bcab0a35fc5d899a109963ef48 /src/libutil/radix.c
parent3c7ecaaa01f7a49f7ffcaa0c533fbc97e9470700 (diff)
downloadrspamd-2d94c35b631d5d74bba56037a406bb125181e623.tar.gz
rspamd-2d94c35b631d5d74bba56037a406bb125181e623.zip
Add routine to check radix trie size.
Diffstat (limited to 'src/libutil/radix.c')
-rw-r--r--src/libutil/radix.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libutil/radix.c b/src/libutil/radix.c
index 605d86668..3ca4c8716 100644
--- a/src/libutil/radix.c
+++ b/src/libutil/radix.c
@@ -642,6 +642,16 @@ radix_add_generic_iplist (const gchar *ip_list, radix_compressed_t **tree)
return (rspamd_radix_add_iplist (ip_list, ",; ", *tree) > 0);
}
+
+gsize
+radix_get_size (radix_compressed_t *tree)
+{
+ if (tree != NULL) {
+ return tree->size;
+ }
+
+ return 0;
+}
/*
* vi:ts=4
*/