]> source.dussan.org Git - rspamd.git/commitdiff
Use constant for hash seed for upstreams selection.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 1 Nov 2014 15:18:48 +0000 (15:18 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 1 Nov 2014 15:18:48 +0000 (15:18 +0000)
src/libutil/upstream.c

index b4d341daca84f0d1f56b4f2d66dc3637a960e834..67dcc83e4c5f59ae6ddad28984b08b745f75de6d 100644 (file)
@@ -271,13 +271,15 @@ rspamd_upstream_ok (struct upstream *up)
        rspamd_mutex_unlock (up->lock);
 }
 
+#define SEED_CONSTANT 0xa574de7df64e9b9dULL
+
 struct upstream_list*
 rspamd_upstreams_create (void)
 {
        struct upstream_list *ls;
 
        ls = g_slice_alloc (sizeof (*ls));
-       ottery_rand_bytes (&ls->hash_seed, sizeof (ls->hash_seed));
+       ls->hash_seed = SEED_CONSTANT;
        ls->ups = g_ptr_array_new ();
        ls->alive = g_ptr_array_new ();
        ls->lock = rspamd_mutex_new ();