aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/roll_history.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-01-14 16:48:52 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-01-14 16:48:52 +0000
commitaa07f4bc9eff2a252743e20faa334f2aa7d589d5 (patch)
tree177051f9fe263c7b1523aff6f83e8c1675d7d8b0 /src/libserver/roll_history.c
parent137f4b1e53572d5f43a5a6368482f82149652091 (diff)
downloadrspamd-aa07f4bc9eff2a252743e20faa334f2aa7d589d5.tar.gz
rspamd-aa07f4bc9eff2a252743e20faa334f2aa7d589d5.zip
[Project] More work towards flexible actions
Diffstat (limited to 'src/libserver/roll_history.c')
-rw-r--r--src/libserver/roll_history.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libserver/roll_history.c b/src/libserver/roll_history.c
index 3df597816..c9367409d 100644
--- a/src/libserver/roll_history.c
+++ b/src/libserver/roll_history.c
@@ -17,6 +17,7 @@
#include "rspamd.h"
#include "lua/lua_common.h"
#include "unix-std.h"
+#include "cfg_file_private.h"
static const gchar rspamd_history_magic_old[] = {'r', 's', 'h', '1'};
@@ -101,6 +102,7 @@ rspamd_roll_history_update (struct roll_history *history,
struct roll_history_row *row;
struct rspamd_metric_result *metric_res;
struct history_metric_callback_data cbdata;
+ struct rspamd_action *action;
if (history->disabled) {
return;
@@ -155,7 +157,8 @@ rspamd_roll_history_update (struct roll_history *history,
}
else {
row->score = metric_res->score;
- row->action = rspamd_check_action_metric (task, metric_res);
+ action = rspamd_check_action_metric (task);
+ row->action = action->action_type;
row->required_score = rspamd_task_get_required_score (task, metric_res);
cbdata.pos = row->symbols;
cbdata.remain = sizeof (row->symbols);