aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-10-13 19:15:22 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-10-13 19:16:10 +0100
commita7a8f2c9187288e7cedd48c8faa9cf5773bfc90b (patch)
treec44abf6d5b18e545ff054bf87ad7f52bc1177f39 /src
parentaf089efeeae85030400beb88f69ecd9ef3d6139d (diff)
downloadrspamd-a7a8f2c9187288e7cedd48c8faa9cf5773bfc90b.tar.gz
rspamd-a7a8f2c9187288e7cedd48c8faa9cf5773bfc90b.zip
[Fix] Fix processing of idempotent rules when autolearn fails
Issue: #1846
Diffstat (limited to 'src')
-rw-r--r--src/libserver/task.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/libserver/task.c b/src/libserver/task.c
index 4aa2e21ad..04ce2b759 100644
--- a/src/libserver/task.c
+++ b/src/libserver/task.c
@@ -768,12 +768,18 @@ rspamd_task_process (struct rspamd_task *task, guint stages)
if (!(task->flags & RSPAMD_TASK_FLAG_LEARN_AUTO)) {
task->err = stat_error;
+ task->processed_stages |= RSPAMD_TASK_STAGE_DONE;
}
- else if (stat_error) {
- g_error_free (stat_error);
- }
+ else {
+ /* Do not skip idempotent in case of learn error */
+ if (stat_error) {
+ g_error_free (stat_error);
+ }
- task->processed_stages |= RSPAMD_TASK_STAGE_DONE;
+ task->processed_stages |= RSPAMD_TASK_STAGE_LEARN|
+ RSPAMD_TASK_STAGE_LEARN_PRE|
+ RSPAMD_TASK_STAGE_LEARN_POST;
+ }
}
}
}