]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix stats for backend-less classifiers
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 26 Oct 2016 09:41:19 +0000 (11:41 +0200)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 26 Oct 2016 10:19:22 +0000 (12:19 +0200)
src/libstat/stat_process.c

index 993de3816a79bd67e0664ac1ad98db1b3df411ff..6bd1c4e2adc44ba0a0a834fd932c768030882768 100644 (file)
@@ -1123,6 +1123,10 @@ rspamd_stat_statistics (struct rspamd_task *task,
        for (i = 0; i < st_ctx->classifiers->len; i ++) {
                cl = g_ptr_array_index (st_ctx->classifiers, i);
 
+               if (cl->cfg->flags & RSPAMD_FLAG_CLASSIFIER_NO_BACKEND) {
+                       continue;
+               }
+
                for (j = 0; j < cl->statfiles_ids->len; j ++) {
                        id = g_array_index (cl->statfiles_ids, gint, j);
                        st = g_ptr_array_index (st_ctx->statfiles, id);