diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-10-12 10:01:31 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-10-12 10:01:31 +0100 |
commit | 1ef680311f90018518d43bae992f1aacb5ae9222 (patch) | |
tree | 88baaaf33a9d84a531bd5a40bb9f79163a4b8a5d | |
parent | 42a4b088c79eb86aa44cd44ce7d19c862e5289b9 (diff) | |
download | rspamd-1ef680311f90018518d43bae992f1aacb5ae9222.tar.gz rspamd-1ef680311f90018518d43bae992f1aacb5ae9222.zip |
[Minor] Set processed stage when called from Lua
-rw-r--r-- | src/lua/lua_task.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c index 4293ef178..c3159f16b 100644 --- a/src/lua/lua_task.c +++ b/src/lua/lua_task.c @@ -1330,8 +1330,14 @@ lua_task_process_message (lua_State *L) if (task != NULL) { if (task->msg.len > 0) { if (rspamd_message_parse (task)) { - lua_pushboolean (L, TRUE); - rspamd_message_process (task); + if (!(task->flags & RSPAMD_TASK_FLAG_SKIP_PROCESS)) { + lua_pushboolean (L, TRUE); + rspamd_message_process (task); + task->processed_stages |= RSPAMD_TASK_STAGE_PROCESS_MESSAGE; + } + else { + lua_pushboolean (L, FALSE); + } } else { lua_pushboolean (L, FALSE); |