diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-04-04 16:07:14 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-04-04 16:07:14 +0100 |
commit | 6a74976d4447f1cadba2b5f3a3c7847e4c9d27a8 (patch) | |
tree | 5b8333907e45b7f1e99c80223d945b77a4bc7e35 /src/fuzzy_storage.c | |
parent | 92b3c8a70c1bc48c6af43bdd988caab4bdaab075 (diff) | |
download | rspamd-6a74976d4447f1cadba2b5f3a3c7847e4c9d27a8.tar.gz rspamd-6a74976d4447f1cadba2b5f3a3c7847e4c9d27a8.zip |
[Feature] Add magic for all workers' contexts
Diffstat (limited to 'src/fuzzy_storage.c')
-rw-r--r-- | src/fuzzy_storage.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c index b37d6766c..4ab92cc9f 100644 --- a/src/fuzzy_storage.c +++ b/src/fuzzy_storage.c @@ -84,7 +84,10 @@ struct fuzzy_key_stat { rspamd_lru_hash_t *last_ips; }; +static const guint64 rspamd_fuzzy_storage_magic = 0x291a3253eb1b3ea5ULL; + struct rspamd_fuzzy_storage_ctx { + guint64 magic; struct fuzzy_global_stat stat; char *hashfile; gdouble expire; @@ -1204,6 +1207,7 @@ init_fuzzy (struct rspamd_config *cfg) ctx = g_malloc0 (sizeof (struct rspamd_fuzzy_storage_ctx)); + ctx->magic = rspamd_fuzzy_storage_magic; ctx->sync_timeout = DEFAULT_SYNC_TIMEOUT; ctx->expire = DEFAULT_EXPIRE; ctx->keypair_cache_size = DEFAULT_KEYPAIR_CACHE_SIZE; |