diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-04-04 14:32:18 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-04-04 14:32:18 +0100 |
commit | c442adeaa297aa760fe7c4fba63c1324056fcc79 (patch) | |
tree | f401b93691418a89d791e4174d2d41d1d8a1185b /src/rspamd.h | |
parent | 007c2befbe517ac6d44830a7900c3ac3fdf6d634 (diff) | |
download | rspamd-c442adeaa297aa760fe7c4fba63c1324056fcc79.tar.gz rspamd-c442adeaa297aa760fe7c4fba63c1324056fcc79.zip |
[Feature] Rework system of workers' flags
Diffstat (limited to 'src/rspamd.h')
-rw-r--r-- | src/rspamd.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/rspamd.h b/src/rspamd.h index 5fb40861c..90a4b3762 100644 --- a/src/rspamd.h +++ b/src/rspamd.h @@ -118,7 +118,7 @@ struct module_ctx { #endif #define RSPAMD_CUR_MODULE_VERSION 0x1 -#define RSPAMD_CUR_WORKER_VERSION 0x1 +#define RSPAMD_CUR_WORKER_VERSION 0x2 #define RSPAMD_FEATURES \ RSPAMD_FEATURE_HYPERSCAN RSPAMD_FEATURE_PCRE2 \ @@ -148,14 +148,19 @@ 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), +}; + typedef struct worker_s { const gchar *name; gpointer (*worker_init_func)(struct rspamd_config *cfg); void (*worker_start_func)(struct rspamd_worker *worker); - gboolean has_socket; - gboolean unique; - gboolean threaded; - gboolean killable; + enum rspamd_worker_flags flags; gint listen_type; guint worker_version; guint64 rspamd_version; |