aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/protocol.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-11-06 14:51:16 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-11-06 14:51:16 +0000
commit6921abd84341a5b2719885165cdf42d6c8ad67c6 (patch)
treea26b1be7bb5ad4fca069731288b3a62ca2fcbdef /src/libserver/protocol.c
parentfe927a38449754f0a5fe090c52b5552b75dd04fd (diff)
downloadrspamd-6921abd84341a5b2719885165cdf42d6c8ad67c6.tar.gz
rspamd-6921abd84341a5b2719885165cdf42d6c8ad67c6.zip
Store real required score inside metric result
Diffstat (limited to 'src/libserver/protocol.c')
-rw-r--r--src/libserver/protocol.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c
index 35697427f..10bbbe2a5 100644
--- a/src/libserver/protocol.c
+++ b/src/libserver/protocol.c
@@ -817,12 +817,11 @@ rspamd_metric_result_ucl (struct rspamd_task *task,
enum rspamd_metric_action action = METRIC_ACTION_NOACTION;
ucl_object_t *obj = NULL, *sobj;;
gpointer h, v;
- double required_score;
const gchar *subject;
m = mres->metric;
mres->action = rspamd_check_action_metric (task, mres->score,
- &required_score, m);
+ &mres->required_score, m);
action = mres->action;
is_spam = (action == METRIC_ACTION_REJECT);
@@ -834,7 +833,7 @@ rspamd_metric_result_ucl (struct rspamd_task *task,
"is_skipped", 0, false);
ucl_object_insert_key (obj, ucl_object_fromdouble (mres->score),
"score", 0, false);
- ucl_object_insert_key (obj, ucl_object_fromdouble (required_score),
+ ucl_object_insert_key (obj, ucl_object_fromdouble (mres->required_score),
"required_score", 0, false);
ucl_object_insert_key (obj,
ucl_object_fromstring (rspamd_action_to_str (action)),