diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-10-11 17:19:00 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-10-11 17:19:00 +0100 |
commit | 673986f9618514c66f05d13c6f663abc942e44c4 (patch) | |
tree | 1c98fc084dc873ca1e6a477ff83ff695b178fe9a /src | |
parent | 98f0a701b71191a7b0373b8dd511bcf5f409e440 (diff) | |
download | rspamd-673986f9618514c66f05d13c6f663abc942e44c4.tar.gz rspamd-673986f9618514c66f05d13c6f663abc942e44c4.zip |
[Minor] Fix score set in passthrough mode
Diffstat (limited to 'src')
-rw-r--r-- | src/libmime/filter.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/src/libmime/filter.c b/src/libmime/filter.c index c06df1b77..ba1e821f3 100644 --- a/src/libmime/filter.c +++ b/src/libmime/filter.c @@ -489,28 +489,8 @@ rspamd_check_action_metric (struct rspamd_task *task, struct rspamd_metric_resul else { /* Peek the highest priority result */ pr = task->result->passthrough_result; - sc = NAN; - - if (isnan (pr->target_score)) { - for (i = pr->action; i < METRIC_ACTION_MAX; i++) { - selected_action = &task->cfg->actions[i]; - sc = mres->actions_limits[i]; - - if (isnan (sc)) { - if (i == pr->action) { - /* No scores defined, just avoid NaN */ - sc = 0; - break; - } - } - else { - break; - } - } - } - else { - sc = pr->target_score; - } + sc = pr->target_score; + selected_action = &task->cfg->actions[pr->action]; if (!isnan (sc)) { if (pr->action == METRIC_ACTION_NOACTION) { |