Changeset 6598
- Timestamp:
- Aug 20, 2008, 2:55:23 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/peer-mgr.c
r6597 r6598 138 138 139 139 static int 140 tr_s impleRandInt( int sup )140 tr_stupidRandInt( int sup ) 141 141 { 142 142 static int init = 0; … … 622 622 setme->priority = inf->pieces[piece].priority; 623 623 setme->peerCount = 0; 624 setme->random = tr_s impleRandInt( UINT16_MAX );624 setme->random = tr_stupidRandInt( UINT16_MAX ); 625 625 setme->missingBlockCount = tr_cpMissingBlocksInPiece( tor->completion, piece ); 626 626 … … 664 664 if( retCount ) { 665 665 tr_peer ** tmp = tr_new( tr_peer*, retCount ); 666 i = tr_s impleRandInt( retCount );666 i = tr_stupidRandInt( retCount ); 667 667 memcpy( tmp, ret, sizeof(tr_peer*) * retCount ); 668 668 memcpy( ret, tmp+i, sizeof(tr_peer*) * (retCount-i) ); … … 1652 1652 if(( n = tr_ptrArraySize( randPool ))) 1653 1653 { 1654 c = tr_ptrArrayNth( randPool, tr_s impleRandInt( n ));1654 c = tr_ptrArrayNth( randPool, tr_stupidRandInt( n )); 1655 1655 c->doUnchoke = 1; 1656 1656 t->optimistic = c->peer;
Note: See TracChangeset
for help on using the changeset viewer.