diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-10-01 16:29:37 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-10-01 16:29:37 +0100 |
commit | df7c6efc1828bc4c91f019135beb54b29c3e1471 (patch) | |
tree | ff8025b5e0f4ca94f0f55308ed4b93da5e2c29d4 /src/libutil/radix.c | |
parent | ed45a1bcfa93fe8e423d44e6229962aab0fb459e (diff) | |
download | rspamd-df7c6efc1828bc4c91f019135beb54b29c3e1471.tar.gz rspamd-df7c6efc1828bc4c91f019135beb54b29c3e1471.zip |
Adopt logger for new radix.
Diffstat (limited to 'src/libutil/radix.c')
-rw-r--r-- | src/libutil/radix.c | 45 |
1 files changed, 24 insertions, 21 deletions
diff --git a/src/libutil/radix.c b/src/libutil/radix.c index 240a7d67d..c8aaaf946 100644 --- a/src/libutil/radix.c +++ b/src/libutil/radix.c @@ -28,27 +28,6 @@ #include "main.h" #include "mem_pool.h" -static void * radix_alloc (radix_tree_t * tree); - -#undef RADIX_DEBUG -#ifndef RADIX_DEBUG -#undef msg_debug -#define msg_debug(...) do {} while (0) -#endif - -struct radix_node_s { - radix_node_t *right; - radix_node_t *left; - radix_node_t *parent; - uintptr_t value; - guint32 key; -}; - -struct radix_tree_s { - radix_node_t *root; - size_t size; - rspamd_mempool_t *pool; -}; struct radix_compressed_node { union { @@ -73,6 +52,29 @@ struct radix_tree_compressed { size_t size; }; + +#ifdef LEGACY_RADIX +static void * radix_alloc (radix_tree_t * tree); + +#undef RADIX_DEBUG +#ifndef RADIX_DEBUG +#undef msg_debug +#define msg_debug(...) do {} while (0) +#endif + +struct radix_node_s { + radix_node_t *right; + radix_node_t *left; + radix_node_t *parent; + uintptr_t value; + guint32 key; +}; +struct radix_tree_s { + radix_node_t *root; + size_t size; + rspamd_mempool_t *pool; +}; + radix_tree_t * radix_tree_create (void) { @@ -373,6 +375,7 @@ radix32_tree_find_addr (radix_tree_t *tree, rspamd_inet_addr_t *addr) return radix32tree_find (tree, ntohl (addr->addr.s4.sin_addr.s_addr)); } +#endif /* Old radix code */ static gboolean radix_compare_compressed (struct radix_compressed_node *node, |