From 89e97bdf940d6c063fc9860306395c500d1c7027 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 29 Nov 2010 15:53:33 -0500 Subject: Add wrappers function for libc random() On windows, it's called something different. --- src/or/relay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/or') diff --git a/src/or/relay.c b/src/or/relay.c index 8a4edb933f..c64afe2dba 100644 --- a/src/or/relay.c +++ b/src/or/relay.c @@ -1517,7 +1517,7 @@ circuit_resume_edge_reading_helper(edge_connection_t *first_conn, * don't need cryptographic randomness here. */ for (conn = first_conn; conn; conn = conn->next_stream) { num_streams++; - if ((random() % num_streams)==0) + if ((tor_weak_random() % num_streams)==0) chosen_stream = conn; /* Invariant: chosen_stream has been chosen uniformly at random from among * the first num_streams streams on first_conn. */ -- cgit v1.2.3-54-g00ecf