aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstat/stat_process.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-10-26 11:41:19 +0200
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-10-26 12:19:22 +0200
commitef8d0e038475f5ce7e80842fcab332b3a1f98ad4 (patch)
tree7abe50a3661977a2449ab2b9931d4376c02401d1 /src/libstat/stat_process.c
parent2c29a9416444b779e75d30af6bdfa5cc0db7e2ad (diff)
downloadrspamd-ef8d0e038475f5ce7e80842fcab332b3a1f98ad4.tar.gz
rspamd-ef8d0e038475f5ce7e80842fcab332b3a1f98ad4.zip
[Fix] Fix stats for backend-less classifiers
Diffstat (limited to 'src/libstat/stat_process.c')
-rw-r--r--src/libstat/stat_process.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libstat/stat_process.c b/src/libstat/stat_process.c
index 993de3816..6bd1c4e2a 100644
--- a/src/libstat/stat_process.c
+++ b/src/libstat/stat_process.c
@@ -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);