diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-01-14 17:59:21 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-01-14 17:59:21 +0000 |
commit | e6e1267ea76d6ea0ede2e60a1d7e0bc82c5efdf5 (patch) | |
tree | c18b363bfaba1577f05b4c81cdeac3bf18dc7a2a | |
parent | 4595a80f9c81b8e4e213f4e81d15de5e8088b638 (diff) | |
download | rspamd-e6e1267ea76d6ea0ede2e60a1d7e0bc82c5efdf5.tar.gz rspamd-e6e1267ea76d6ea0ede2e60a1d7e0bc82c5efdf5.zip |
[Minor] Fix some more issues after actions rework
-rw-r--r-- | src/libmime/filter.c | 4 | ||||
-rw-r--r-- | src/libserver/task.c | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/libmime/filter.c b/src/libmime/filter.c index ea9b500c9..45563e23f 100644 --- a/src/libmime/filter.c +++ b/src/libmime/filter.c @@ -494,7 +494,6 @@ rspamd_check_action_metric (struct rspamd_task *task) struct rspamd_passthrough_result *pr; double max_score = -(G_MAXDOUBLE), sc; int i; - gboolean set_action = FALSE; struct rspamd_metric_result *mres = task->result; /* We are not certain about the results during processing */ @@ -507,7 +506,8 @@ rspamd_check_action_metric (struct rspamd_task *task) noaction = action_lim; } - if (isnan (sc)) { + if (isnan (sc) || + (action_lim->action->flags & (RSPAMD_ACTION_NO_THRESHOLD|RSPAMD_ACTION_HAM))) { continue; } diff --git a/src/libserver/task.c b/src/libserver/task.c index df1a561cb..2b00f6805 100644 --- a/src/libserver/task.c +++ b/src/libserver/task.c @@ -1553,7 +1553,11 @@ rspamd_task_get_required_score (struct rspamd_task *task, struct rspamd_metric_r } for (i = m->nactions - 1; i >= 0; i --) { - if (!isnan (m->actions_limits[i].cur_limit)) { + struct rspamd_action_result *action_lim = &m->actions_limits[i]; + + + if (!isnan (action_lim->cur_limit) && + !(action_lim->action->flags & (RSPAMD_ACTION_NO_THRESHOLD|RSPAMD_ACTION_HAM))) { return m->actions_limits[i].cur_limit; } } |