From 77b46f8ab8b468cb96c77558c71b2ca7b1c594a4 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 15 Nov 2018 13:20:49 +0000 Subject: [PATCH] [Fix] Properly set learned count --- src/libstat/stat_process.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libstat/stat_process.c b/src/libstat/stat_process.c index 228b6b87bc..87c5c3190a 100644 --- a/src/libstat/stat_process.c +++ b/src/libstat/stat_process.c @@ -525,6 +525,12 @@ rspamd_stat_classifiers_process (struct rspamd_stat_ctx *st_ctx, return; } + for (i = 0; i < st_ctx->classifiers->len; i++) { + cl = g_ptr_array_index (st_ctx->classifiers, i); + cl->spam_learns = 0; + cl->ham_learns = 0; + } + for (i = 0; i < st_ctx->statfiles->len; i++) { st = g_ptr_array_index (st_ctx->statfiles, i); cl = st->classifier; -- 2.47.3