]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Fix] Properly set learned count
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 15 Nov 2018 13:20:49 +0000 (13:20 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 15 Nov 2018 13:20:49 +0000 (13:20 +0000)
src/libstat/stat_process.c

index 228b6b87bc6b969d012a04865759c7fdaae60eb9..87c5c3190aad2d7c4b1808f9eb2c4323320d70fb 100644 (file)
@@ -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;