aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua_worker.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-04-04 16:07:14 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-04-04 16:07:14 +0100
commit6a74976d4447f1cadba2b5f3a3c7847e4c9d27a8 (patch)
tree5b8333907e45b7f1e99c80223d945b77a4bc7e35 /src/lua_worker.c
parent92b3c8a70c1bc48c6af43bdd988caab4bdaab075 (diff)
downloadrspamd-6a74976d4447f1cadba2b5f3a3c7847e4c9d27a8.tar.gz
rspamd-6a74976d4447f1cadba2b5f3a3c7847e4c9d27a8.zip
[Feature] Add magic for all workers' contexts
Diffstat (limited to 'src/lua_worker.c')
-rw-r--r--src/lua_worker.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lua_worker.c b/src/lua_worker.c
index ea876cec5..87f597e28 100644
--- a/src/lua_worker.c
+++ b/src/lua_worker.c
@@ -47,10 +47,12 @@ worker_t lua_worker = {
RSPAMD_WORKER_VER /* Version info */
};
+static const guint64 rspamd_lua_ctx_magic = 0x8055e2652aacf96eULL;
/*
* Worker's context
*/
struct rspamd_lua_worker_ctx {
+ guint64 magic;
/* DNS resolver */
struct rspamd_dns_resolver *resolver;
/* Events base */
@@ -310,6 +312,7 @@ init_lua_worker (struct rspamd_config *cfg)
type = g_quark_try_string ("lua");
ctx = g_malloc0 (sizeof (struct rspamd_lua_worker_ctx));
+ ctx->magic = rspamd_lua_ctx_magic;
ctx->params = g_hash_table_new_full (rspamd_str_hash,
rspamd_str_equal,
g_free,