diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-05-03 16:51:09 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-05-03 16:51:09 +0100 |
commit | a65d9460ee4bbeefc097268feb65c29a2d97d911 (patch) | |
tree | 71b5372167a11e80a0d86ed61466cd2c63fe11a1 | |
parent | 88c10484ff3802b59d8bcc7e9832e9fe97c9bb89 (diff) | |
download | rspamd-a65d9460ee4bbeefc097268feb65c29a2d97d911.tar.gz rspamd-a65d9460ee4bbeefc097268feb65c29a2d97d911.zip |
[CritFix] Really skip filters in case of pre-result set
-rw-r--r-- | src/libserver/task.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/libserver/task.c b/src/libserver/task.c index af7495b23..890e05f20 100644 --- a/src/libserver/task.c +++ b/src/libserver/task.c @@ -435,6 +435,14 @@ rspamd_task_process (struct rspamd_task *task, guint stages) return TRUE; } + if (task->pre_result.action != METRIC_ACTION_MAX) { + /* Skip all if we have result here */ + task->processed_stages |= RSPAMD_TASK_STAGE_DONE; + msg_info_task ("skip filters, as pre-filter returned %s action", + rspamd_action_to_str (task->pre_result.action)); + } + + task->flags |= RSPAMD_TASK_FLAG_PROCESSING; st = rspamd_task_select_processing_stage (task, stages); @@ -448,13 +456,6 @@ rspamd_task_process (struct rspamd_task *task, guint stages) case RSPAMD_TASK_STAGE_PRE_FILTERS: rspamd_lua_call_pre_filters (task); - - if (task->pre_result.action != METRIC_ACTION_MAX) { - /* Skip all if we have result here */ - task->processed_stages |= RSPAMD_TASK_STAGE_DONE; - msg_info_task ("skip filters, as pre-filter returned %s action", - rspamd_action_to_str (task->pre_result.action)); - } break; case RSPAMD_TASK_STAGE_FILTERS: |