]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Allow to set skip_process flag
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 6 Jun 2018 15:48:19 +0000 (16:48 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 6 Jun 2018 15:48:19 +0000 (16:48 +0100)
src/lua/lua_task.c

index 85459d44027e2a8be380d08c53f20fca1d936444..1807888c82cf1fc8bfcc55cba3d2e21e117b01f5 100644 (file)
@@ -3607,6 +3607,7 @@ lua_task_set_flag (lua_State *L)
                LUA_TASK_SET_FLAG (flag, "broken_headers",
                                RSPAMD_TASK_FLAG_BROKEN_HEADERS, set);
                LUA_TASK_SET_FLAG (flag, "greylisted", RSPAMD_TASK_FLAG_GREYLISTED, set);
+               LUA_TASK_SET_FLAG (flag, "skip_process", RSPAMD_TASK_FLAG_SKIP_PROCESS, set);
 
                if (!found) {
                        msg_warn_task ("unknown flag requested: %s", flag);
@@ -3637,6 +3638,8 @@ lua_task_has_flag (lua_State *L)
                LUA_TASK_GET_FLAG (flag, "greylisted", RSPAMD_TASK_FLAG_GREYLISTED);
                LUA_TASK_GET_FLAG (flag, "broken_headers",
                                RSPAMD_TASK_FLAG_BROKEN_HEADERS);
+               LUA_TASK_GET_FLAG (flag, "skip_process",
+                               RSPAMD_TASK_FLAG_SKIP_PROCESS);
                LUA_TASK_GET_FLAG (flag, "milter",
                                RSPAMD_TASK_FLAG_MILTER);
 
@@ -3705,6 +3708,10 @@ lua_task_get_flags (lua_State *L)
                                        lua_pushstring (L, "greylisted");
                                        lua_rawseti (L, -2, idx++);
                                        break;
+                               case RSPAMD_TASK_FLAG_SKIP_PROCESS:
+                                       lua_pushstring (L, "skip_process");
+                                       lua_rawseti (L, -2, idx++);
+                                       break;
                                case RSPAMD_TASK_FLAG_MILTER:
                                        lua_pushstring (L, "milter");
                                        lua_rawseti (L, -2, idx++);