]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Set processed stage when called from Lua
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 12 Oct 2019 09:01:31 +0000 (10:01 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 12 Oct 2019 09:01:31 +0000 (10:01 +0100)
src/lua/lua_task.c

index 4293ef1781dc5770ee616624b75d62f26a19f940..c3159f16bf9c0ae9539521a824d68729615b6768 100644 (file)
@@ -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);