diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-02-26 15:45:33 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-02-26 15:45:33 +0000 |
commit | 4d386d0c689ad4607c67dcd634e53aadea940613 (patch) | |
tree | f9290e546342db163e361ba284d31630dc874850 /src/rspamd.h | |
parent | 66c4eda320e6a7d7e3d55a3868c1197941d9c259 (diff) | |
download | rspamd-4d386d0c689ad4607c67dcd634e53aadea940613.tar.gz rspamd-4d386d0c689ad4607c67dcd634e53aadea940613.zip |
[Minor] Allow to detect worker's scanner flag from lua
Diffstat (limited to 'src/rspamd.h')
-rw-r--r-- | src/rspamd.h | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/rspamd.h b/src/rspamd.h index adc2576b4..4fdc626da 100644 --- a/src/rspamd.h +++ b/src/rspamd.h @@ -52,6 +52,17 @@ #define CR '\r' #define LF '\n' +enum rspamd_worker_flags { + RSPAMD_WORKER_HAS_SOCKET = (1 << 0), + RSPAMD_WORKER_UNIQUE = (1 << 1), + RSPAMD_WORKER_THREADED = (1 << 2), + RSPAMD_WORKER_KILLABLE = (1 << 3), + RSPAMD_WORKER_ALWAYS_START = (1 << 4), + RSPAMD_WORKER_SCANNER = (1 << 5), + RSPAMD_WORKER_CONTROLLER = (1 << 6), +}; + + /** * Worker process structure */ @@ -68,6 +79,7 @@ struct rspamd_worker { GList *accept_events; /**< socket events */ struct rspamd_worker_conf *cf; /**< worker config data */ gpointer ctx; /**< worker's specific data */ + enum rspamd_worker_flags flags; /**< worker's flags */ gint control_pipe[2]; /**< control pipe. [0] is used by main process, [1] is used by a worker */ gint srv_pipe[2]; /**< used by workers to request something from the @@ -180,14 +192,6 @@ typedef struct module_s { const gchar *rspamd_features; } module_t; -enum rspamd_worker_flags { - RSPAMD_WORKER_HAS_SOCKET = (1 << 0), - RSPAMD_WORKER_UNIQUE = (1 << 1), - RSPAMD_WORKER_THREADED = (1 << 2), - RSPAMD_WORKER_KILLABLE = (1 << 3), - RSPAMD_WORKER_ALWAYS_START = (1 << 4), -}; - enum rspamd_worker_socket_type { RSPAMD_WORKER_SOCKET_NONE = 0, RSPAMD_WORKER_SOCKET_TCP = (1 << 0), |