From 1564b37d8b8f9ed7018ee5afef50ad2bf4409b28 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 27 Feb 2017 18:15:12 +0000 Subject: [PATCH] [Minor] Fix classifiers disabling --- src/libserver/symbols_cache.c | 3 ++- src/libstat/stat_process.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/libserver/symbols_cache.c b/src/libserver/symbols_cache.c index 3378cc142..cf0161945 100644 --- a/src/libserver/symbols_cache.c +++ b/src/libserver/symbols_cache.c @@ -357,7 +357,8 @@ rspamd_symbols_cache_resort (struct symbols_cache *cache) it = g_ptr_array_index (cache->items_by_id, i); total_hits += it->st->total_hits; - if (!(it->type & (SYMBOL_TYPE_PREFILTER|SYMBOL_TYPE_POSTFILTER|SYMBOL_TYPE_COMPOSITE))) { + if (!(it->type & (SYMBOL_TYPE_PREFILTER|SYMBOL_TYPE_POSTFILTER + |SYMBOL_TYPE_COMPOSITE|SYMBOL_TYPE_CLASSIFIER))) { g_ptr_array_add (ord->d, it); } } diff --git a/src/libstat/stat_process.c b/src/libstat/stat_process.c index 7eff21e52..d71184f82 100644 --- a/src/libstat/stat_process.c +++ b/src/libstat/stat_process.c @@ -451,8 +451,8 @@ rspamd_stat_classifiers_process (struct rspamd_stat_ctx *st_ctx, skip = FALSE; if (!(cl->cfg->flags & RSPAMD_FLAG_CLASSIFIER_NO_BACKEND)) { - for (j = 0; j < cl->statfiles_ids->len; i++) { - id = g_array_index (cl->statfiles_ids, gint, i); + for (j = 0; j < cl->statfiles_ids->len; j++) { + id = g_array_index (cl->statfiles_ids, gint, j); bk_run = g_ptr_array_index (task->stat_runtimes, id); if (bk_run == NULL) { -- 2.39.5