diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-04-22 16:57:23 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-04-22 16:57:23 +0100 |
commit | 7a334aa330a6e8dfe87bb97d186da4977b27594e (patch) | |
tree | ed933d6fa37b61e7966e3fea67c2699ddfd1a3a5 /src/fuzzy_storage.c | |
parent | 835371cac9d0f6bcd666904f0facfc4481b9a03a (diff) | |
download | rspamd-7a334aa330a6e8dfe87bb97d186da4977b27594e.tar.gz rspamd-7a334aa330a6e8dfe87bb97d186da4977b27594e.zip |
Set default sync timeout.
Diffstat (limited to 'src/fuzzy_storage.c')
-rw-r--r-- | src/fuzzy_storage.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c index c9286affc..5e89b9207 100644 --- a/src/fuzzy_storage.c +++ b/src/fuzzy_storage.c @@ -44,7 +44,7 @@ /* This number is used as expire time in seconds for cache items (2 days) */ #define DEFAULT_EXPIRE 172800L /* Resync value in seconds */ -#define DEFAULT_SYNC_TIMEOUT 60 +#define DEFAULT_SYNC_TIMEOUT 60.0 #define INVALID_NODE_TIME (guint64) - 1 @@ -332,6 +332,8 @@ init_fuzzy (struct rspamd_config *cfg) ctx = g_malloc0 (sizeof (struct rspamd_fuzzy_storage_ctx)); + ctx->sync_timeout = DEFAULT_SYNC_TIMEOUT; + rspamd_rcl_register_worker_option (cfg, type, "hashfile", rspamd_rcl_parse_struct_string, ctx, G_STRUCT_OFFSET (struct rspamd_fuzzy_storage_ctx, hashfile), 0); @@ -358,7 +360,6 @@ init_fuzzy (struct rspamd_config *cfg) G_STRUCT_OFFSET (struct rspamd_fuzzy_storage_ctx, expire), RSPAMD_CL_FLAG_TIME_FLOAT); - rspamd_rcl_register_worker_option (cfg, type, "allow_update", rspamd_rcl_parse_struct_string, ctx, G_STRUCT_OFFSET (struct rspamd_fuzzy_storage_ctx, update_map), 0); |