*/
#include <libserver/rspamd_control.h>
+#include <src/libutil/map_private.h>
#include "config.h"
#include "util.h"
#include "rspamd.h"
&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 */
map = cur->data;
map->ev_base = ev_base;
map->r = resolver;
- map->active_http = active_http;
+
+ if (active_http) {
+ map->active_http = active_http;
+ }
rspamd_map_schedule_periodic (map, FALSE, TRUE, FALSE);