diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-10-21 19:00:20 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-10-21 19:00:44 +0100 |
commit | 558229b49eb9fd5ad15a57a437c97c63aaf43bd8 (patch) | |
tree | e49ee9c1a39c62740c1ee1aa6f6599071c6d9f92 /src/fuzzy_storage.c | |
parent | 812c37a88e390105861d75e91bffbb39ddee9f8f (diff) | |
download | rspamd-558229b49eb9fd5ad15a57a437c97c63aaf43bd8.tar.gz rspamd-558229b49eb9fd5ad15a57a437c97c63aaf43bd8.zip |
[Fix] Actively load skip hashes map in fuzzy storage
MFH: rspamd-1.6
Diffstat (limited to 'src/fuzzy_storage.c')
-rw-r--r-- | src/fuzzy_storage.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c index e08598969..54d3db224 100644 --- a/src/fuzzy_storage.c +++ b/src/fuzzy_storage.c @@ -18,6 +18,7 @@ */ #include <libserver/rspamd_control.h> +#include <src/libutil/map_private.h> #include "config.h" #include "util.h" #include "rspamd.h" @@ -2799,12 +2800,19 @@ start_fuzzy (struct rspamd_worker *worker) &ctx->master_ips, NULL); } if (ctx->skip_map != NULL) { - if (!rspamd_map_add_from_ucl (cfg, ctx->skip_map, + struct rspamd_map *m; + + if ((m = rspamd_map_add_from_ucl (cfg, ctx->skip_map, "Skip hashes", rspamd_kv_list_read, rspamd_kv_list_fin, - (void **)&ctx->skip_hashes)) { + (void **)&ctx->skip_hashes)) == NULL) { msg_warn_config ("cannot load hashes list from %s", ucl_object_tostring (ctx->skip_map)); } + else { + if (worker->index == 0) { + m->active_http = TRUE; + } + } } /* Maps events */ |