From: Vsevolod Stakhov Date: Wed, 22 Apr 2015 15:57:23 +0000 (+0100) Subject: Set default sync timeout. X-Git-Tag: 0.9.0~174 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a334aa330a6e8dfe87bb97d186da4977b27594e;p=thirdparty%2Frspamd.git Set default sync timeout. --- diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c index c9286affcb..5e89b9207a 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);