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/core/pipe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/pipe.c') diff --git a/src/core/pipe.c b/src/core/pipe.c index 249e887c..0633dea9 100644 --- a/src/core/pipe.c +++ b/src/core/pipe.c @@ -190,7 +190,7 @@ nni_pipe_start(nni_pipe *pipe) // happen if we wrap -- i.e. we've had 4 billion or so pipes. // XXX: consider making this a hash table!! nni_pipe *check; - pipe->p_id = nni_plat_nextid() & 0x7FFFFFFF; + pipe->p_id = nni_random() & 0x7FFFFFFF; collide = 0; NNI_LIST_FOREACH (&sock->s_pipes, check) { if ((pipe != check) && (check->p_id == pipe->p_id)) { -- cgit v1.2.3-70-g09d2