diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-11-01 15:18:48 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-11-01 15:18:48 +0000 |
commit | 1ae2663a7f2dab85cf513bc1f607244a3c3134f4 (patch) | |
tree | cb86bf081ebe4e15e759082d7407a3af816a3f4e /src/libutil/upstream.c | |
parent | cd597be6acdd134cd5be598ff810aea5d8ff32be (diff) | |
download | rspamd-1ae2663a7f2dab85cf513bc1f607244a3c3134f4.tar.gz rspamd-1ae2663a7f2dab85cf513bc1f607244a3c3134f4.zip |
Use constant for hash seed for upstreams selection.
Diffstat (limited to 'src/libutil/upstream.c')
-rw-r--r-- | src/libutil/upstream.c | 4 |
1 files changed, 3 insertions, 1 deletions
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 (); |