From c5b5bd910507520f7974a156a1de9d187f23bc2f Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 8 Jan 2017 15:28:37 -0800 Subject: New ISAAC pRNG. This replaces other local hacks for random data. Platforms must seed the pRNGs by offering an nni_plat_seed_prng() routine. Implementations for POSIX using various options (including the /dev/urandom device) are supplied. --- src/protocol/survey/survey.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/protocol/survey') diff --git a/src/protocol/survey/survey.c b/src/protocol/survey/survey.c index cb600dc3..9def9292 100644 --- a/src/protocol/survey/survey.c +++ b/src/protocol/survey/survey.c @@ -54,8 +54,7 @@ nni_surv_sock_init(void **sp, nni_sock *nsock) return (rv); } NNI_LIST_INIT(&psock->pipes, nni_surv_pipe, node); - // this is "semi random" start for request IDs. - psock->nextid = (nni_clock() >> 32) ^ (nni_clock() & 0xffffffff); + psock->nextid = nni_random(); psock->nsock = nsock; psock->raw = 0; psock->survtime = NNI_SECOND * 60; -- cgit v1.2.3-70-g09d2