From 1ae2663a7f2dab85cf513bc1f607244a3c3134f4 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 1 Nov 2014 15:18:48 +0000 Subject: Use constant for hash seed for upstreams selection. --- src/libutil/upstream.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libutil/upstream.c b/src/libutil/upstream.c index b4d341dac..67dcc83e4 100644 --- a/src/libutil/upstream.c +++ b/src/libutil/upstream.c @@ -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 (); -- cgit v1.2.3