aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-03-22 10:59:31 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-03-22 10:59:31 +0000
commitb3e4fdec18a66450aca807656ee0b60e27b6f2e7 (patch)
treecec15a655b7f1d3ad68768291f531433c58977fc /src/libserver
parent6c82b33813c0704e30902ef316236889cfc1f1a6 (diff)
downloadrspamd-b3e4fdec18a66450aca807656ee0b60e27b6f2e7.tar.gz
rspamd-b3e4fdec18a66450aca807656ee0b60e27b6f2e7.zip
[Fix] Rework logic of actions setting
Diffstat (limited to 'src/libserver')
-rw-r--r--src/libserver/composites.c2
-rw-r--r--src/libserver/task.c7
2 files changed, 4 insertions, 5 deletions
diff --git a/src/libserver/composites.c b/src/libserver/composites.c
index 6b6776f47..a90b5c032 100644
--- a/src/libserver/composites.c
+++ b/src/libserver/composites.c
@@ -433,8 +433,6 @@ composites_remove_symbols (gpointer key, gpointer value, gpointer data)
cd->metric_res->score -= rd->ms->score;
rd->ms->score = 0.0;
}
-
- cd->metric_res->changes ++;
}
}
diff --git a/src/libserver/task.c b/src/libserver/task.c
index ce21523e7..71e38ed4c 100644
--- a/src/libserver/task.c
+++ b/src/libserver/task.c
@@ -1033,10 +1033,11 @@ rspamd_task_log_metric_res (struct rspamd_task *task,
rspamd_fstring_t *symbuf;
struct rspamd_symbol_result *sym;
GPtrArray *sorted_symbols;
+ enum rspamd_action_type act;
guint i, j;
mres = task->result;
- rspamd_check_action_metric (task, mres);
+ act = rspamd_check_action_metric (task, mres);
if (mres != NULL) {
switch (lf->type) {
@@ -1044,7 +1045,7 @@ rspamd_task_log_metric_res (struct rspamd_task *task,
if (RSPAMD_TASK_IS_SKIPPED (task)) {
res.begin = "S";
}
- else if (mres->action == METRIC_ACTION_REJECT) {
+ else if (act == METRIC_ACTION_REJECT) {
res.begin = "T";
}
else {
@@ -1054,7 +1055,7 @@ rspamd_task_log_metric_res (struct rspamd_task *task,
res.len = 1;
break;
case RSPAMD_LOG_ACTION:
- res.begin = rspamd_action_to_str (mres->action);
+ res.begin = rspamd_action_to_str (act);
res.len = strlen (res.begin);
break;
case RSPAMD_LOG_SCORES: