summaryrefslogtreecommitdiffstats
path: root/src/controller.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-02-15 17:28:06 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-02-15 17:28:06 +0000
commit153e64677902c1acc7a1e8ee21d5b634d8a65885 (patch)
treef6055a7c820e067218142be908165a7746d192f3 /src/controller.c
parentdf75947ab9f8bdd9eb2b5c05384d49e247c8b41d (diff)
downloadrspamd-153e64677902c1acc7a1e8ee21d5b634d8a65885.tar.gz
rspamd-153e64677902c1acc7a1e8ee21d5b634d8a65885.zip
Fix logging for embedded maps
Diffstat (limited to 'src/controller.c')
-rw-r--r--src/controller.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/controller.c b/src/controller.c
index 8e230eb0f..7d39be8d4 100644
--- a/src/controller.c
+++ b/src/controller.c
@@ -2519,16 +2519,19 @@ start_controller_worker (struct rspamd_worker *worker)
secure_ip = cur->data;
/* Try map syntax */
- if (!rspamd_map_add (worker->srv->cfg, secure_ip,
- "Allow webui access from the specified IP",
- rspamd_radix_read, rspamd_radix_fin, (void **)&ctx->secure_map)) {
- /* Fallback to the plain IP */
+ if (!rspamd_map_is_map (secure_ip)) {
if (!radix_add_generic_iplist (secure_ip,
&ctx->secure_map)) {
msg_warn_ctx ("cannot load or parse ip list from '%s'",
secure_ip);
}
}
+ else {
+ rspamd_map_add (worker->srv->cfg, secure_ip,
+ "Allow webui access from the specified IP",
+ rspamd_radix_read, rspamd_radix_fin,
+ (void **)&ctx->secure_map);
+ }
cur = g_list_next (cur);
}
}