aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/upstream.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-11-01 15:18:48 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-11-01 15:18:48 +0000
commit1ae2663a7f2dab85cf513bc1f607244a3c3134f4 (patch)
treecb86bf081ebe4e15e759082d7407a3af816a3f4e /src/libutil/upstream.c
parentcd597be6acdd134cd5be598ff810aea5d8ff32be (diff)
downloadrspamd-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.c4
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 ();