]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Set default sync timeout.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 22 Apr 2015 15:57:23 +0000 (16:57 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 22 Apr 2015 15:57:23 +0000 (16:57 +0100)
src/fuzzy_storage.c

index c9286affcb8e69d9e0f83269d5a6718e850e8185..5e89b9207a5193b7676079bffd1e2a736aec0eef 100644 (file)
@@ -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);