aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/protocol.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-03-29 11:31:59 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-03-29 11:31:59 +0100
commitfb6e9f73f4b26fff517784e820d4896020f49c40 (patch)
tree71b906322fec77f496c2f370086e5a2c4b5aceb7 /src/libserver/protocol.c
parent365d60218dac672472b0405a088e06394a1a371c (diff)
downloadrspamd-fb6e9f73f4b26fff517784e820d4896020f49c40.tar.gz
rspamd-fb6e9f73f4b26fff517784e820d4896020f49c40.zip
[Feature] Simplify actions application by the settings
Diffstat (limited to 'src/libserver/protocol.c')
-rw-r--r--src/libserver/protocol.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c
index f949ca0a5..609f7995b 100644
--- a/src/libserver/protocol.c
+++ b/src/libserver/protocol.c
@@ -801,8 +801,7 @@ rspamd_metric_result_ucl (struct rspamd_task *task,
const gchar *subject;
m = mres->metric;
- mres->action = rspamd_check_action_metric (task, mres->score,
- &mres->actions_limits[METRIC_ACTION_REJECT], m);
+ mres->action = rspamd_check_action_metric (task, mres);
action = mres->action;
is_spam = (action < METRIC_ACTION_GREYLIST);
@@ -978,7 +977,6 @@ rspamd_protocol_http_reply (struct rspamd_http_message *msg,
const struct rspamd_re_cache_stat *restat;
gpointer h, v;
ucl_object_t *top = NULL;
- gdouble required_score;
gint action;
/* Write custom headers */
@@ -1032,8 +1030,7 @@ rspamd_protocol_http_reply (struct rspamd_http_message *msg,
/* Update stat for default metric */
metric_res = g_hash_table_lookup (task->results, DEFAULT_METRIC);
if (metric_res != NULL) {
- action = rspamd_check_action_metric (task, metric_res->score, &required_score,
- metric_res->metric);
+ action = rspamd_check_action_metric (task, metric_res);
if (action <= METRIC_ACTION_NOACTION) {
#ifndef HAVE_ATOMIC_BUILTINS
task->worker->srv->stat->actions_stat[action]++;