diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-02-15 17:28:06 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-02-15 17:28:06 +0000 |
commit | 153e64677902c1acc7a1e8ee21d5b634d8a65885 (patch) | |
tree | f6055a7c820e067218142be908165a7746d192f3 /src/libutil/util.c | |
parent | df75947ab9f8bdd9eb2b5c05384d49e247c8b41d (diff) | |
download | rspamd-153e64677902c1acc7a1e8ee21d5b634d8a65885.tar.gz rspamd-153e64677902c1acc7a1e8ee21d5b634d8a65885.zip |
Fix logging for embedded maps
Diffstat (limited to 'src/libutil/util.c')
-rw-r--r-- | src/libutil/util.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/libutil/util.c b/src/libutil/util.c index 30665dfb8..0023a9ba1 100644 --- a/src/libutil/util.c +++ b/src/libutil/util.c @@ -2019,12 +2019,15 @@ rspamd_config_libs (struct rspamd_external_libs_ctx *ctx, if (ctx != NULL) { if (cfg->local_addrs) { - if (!rspamd_map_add (cfg, cfg->local_addrs, - "Local addresses", rspamd_radix_read, rspamd_radix_fin, - (void **) ctx->local_addrs)) { + if (!rspamd_map_is_map (cfg->local_addrs)) { radix_add_generic_iplist (cfg->local_addrs, (radix_compressed_t **)ctx->local_addrs); } + else { + rspamd_map_add (cfg, cfg->local_addrs, + "Local addresses", rspamd_radix_read, rspamd_radix_fin, + (void **) ctx->local_addrs); + } } } } |