From daf26881b7cb7b05f697a22f130c30ccb929636f Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Wed, 25 Jul 2007 20:55:39 +0000 Subject: [PATCH] avoid using tr_rand() in peerPulse(); it's giving both me and SWE some odd behavior --- libtransmission/peer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libtransmission/peer.c b/libtransmission/peer.c index 693c8710a..6b7bda971 100644 --- a/libtransmission/peer.c +++ b/libtransmission/peer.c @@ -685,7 +685,7 @@ writeEnd: all peers for 2, and so on. Randomize our starting point into "pool" to reduce such overlap */ int piecesLeft = poolSize; - int p = tr_rand( poolSize ); + int p = (int)(tr_date() % poolSize); for( ; openSlots>0 && piecesLeft>0; --piecesLeft, p=(p+1)%poolSize ) { const int piece = pool[p];