summaryrefslogtreecommitdiffstats
path: root/src/worker.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/worker.c
parent137f4b1e53572d5f43a5a6368482f82149652091 (diff)
downloadrspamd-aa07f4bc9eff2a252743e20faa334f2aa7d589d5.tar.gz
rspamd-aa07f4bc9eff2a252743e20faa334f2aa7d589d5.zip
[Project] More work towards flexible actions
Diffstat (limited to 'src/worker.c')
-rw-r--r--src/worker.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/worker.c b/src/worker.c
index 5147e0a2d..2f7176a8d 100644
--- a/src/worker.c
+++ b/src/worker.c
@@ -36,6 +36,7 @@
#include "libutil/http_private.h"
#include "libmime/lang_detection.h"
#include <math.h>
+#include <src/libserver/cfg_file_private.h>
#include "unix-std.h"
#include "lua/lua_common.h"
@@ -144,11 +145,15 @@ rspamd_task_timeout (gint fd, short what, gpointer ud)
msg_info_task ("processing of task timed out, forced processing");
if (task->cfg->soft_reject_on_timeout) {
- struct rspamd_metric_result *res = task->result;
+ struct rspamd_action *action, *soft_reject;
- if (rspamd_check_action_metric (task, res) != METRIC_ACTION_REJECT) {
+ action = rspamd_check_action_metric (task);
+
+ if (action->action_type != METRIC_ACTION_REJECT) {
+ soft_reject = rspamd_config_get_action_by_type (task->cfg,
+ METRIC_ACTION_SOFT_REJECT);
rspamd_add_passthrough_result (task,
- METRIC_ACTION_SOFT_REJECT,
+ soft_reject,
0,
NAN,
"timeout processing message",