aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstat/stat_process.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-01-08 17:21:12 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-01-08 17:21:12 +0000
commit2d6b01959049355b4a75b9e2d667b6c885a17312 (patch)
tree353db462a9b68279ccbcaa268259a21536a4b82e /src/libstat/stat_process.c
parent79402fe47a7d2474199f01d20c42d51f8f231336 (diff)
downloadrspamd-2d6b01959049355b4a75b9e2d667b6c885a17312.tar.gz
rspamd-2d6b01959049355b4a75b9e2d667b6c885a17312.zip
Fix setting of number of learns.
Diffstat (limited to 'src/libstat/stat_process.c')
-rw-r--r--src/libstat/stat_process.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstat/stat_process.c b/src/libstat/stat_process.c
index 45a32b57c..81986f552 100644
--- a/src/libstat/stat_process.c
+++ b/src/libstat/stat_process.c
@@ -540,7 +540,7 @@ rspamd_stat_backends_learn (struct rspamd_stat_ctx *st_ctx,
if (!!spam == !!st->stcf->is_spam) {
st->backend->inc_learns (task, bk_run, st_ctx);
}
- else {
+ else if (task->flags & RSPAMD_TASK_FLAG_UNLEARN) {
st->backend->dec_learns (task, bk_run, st_ctx);
}
}