]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix classifiers disabling
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 27 Feb 2017 18:15:12 +0000 (18:15 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 27 Feb 2017 18:15:12 +0000 (18:15 +0000)
src/libserver/symbols_cache.c
src/libstat/stat_process.c

index 3378cc142b00bea3434266f999b8a8117104d6c5..cf016194563a6a52a32851f9813d84e99269fd60 100644 (file)
@@ -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);
                }
        }
index 7eff21e52e199dbd9af38f86cf943344bd66bac1..d71184f822da028f77a2943dd291d1501d261a6f 100644 (file)
@@ -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) {