diff options
author | Nick Mathewson <nickm@torproject.org> | 2010-11-29 15:53:33 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2010-11-29 16:00:47 -0500 |
commit | 89e97bdf940d6c063fc9860306395c500d1c7027 (patch) | |
tree | 4363f41168ede3a9aa6da61cfc8282508b84568d /src/or/relay.c | |
parent | 0eafe23ff38dd895c15b2deba70e5df997cf97e9 (diff) | |
download | tor-89e97bdf940d6c063fc9860306395c500d1c7027.tar.gz tor-89e97bdf940d6c063fc9860306395c500d1c7027.zip |
Add wrappers function for libc random()
On windows, it's called something different.
Diffstat (limited to 'src/or/relay.c')
-rw-r--r-- | src/or/relay.c | 2 |
1 files changed, 1 insertions, 1 deletions
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. */ |