Changeset 3658 for trunk/libtransmission/peer-mgr.c
- Timestamp:
- Oct 30, 2007, 8:11:23 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/peer-mgr.c
r3619 r3658 724 724 for( i=0; peerCount && i<blockCount; ++i ) 725 725 { 726 const int block = blocks[i];726 const uint64_t block = blocks[i]; 727 727 const uint32_t index = tr_torBlockPiece( tor, block ); 728 728 const uint32_t begin = (block * tor->blockSize) - (index * tor->info.pieceSize); 729 const uint32_t length = tr_torBlockCountBytes( tor, block );729 const uint32_t length = tr_torBlockCountBytes( tor, (int)block ); 730 730 int j; 731 assert( _tr_block( tor, index, begin ) == block );731 assert( _tr_block( tor, index, begin ) == (int)block ); 732 732 assert( begin < (uint32_t)tr_torPieceCountBytes( tor, (int)index ) ); 733 733 assert( (begin + length) <= (uint32_t)tr_torPieceCountBytes( tor, (int)index ) ); 734 734 735 fprintf( stderr, "looking for a peer that will take my request for block #%"PRIu64"\n", block ); 735 736 736 737 /* find a peer who can ask for this block */ … … 751 752 752 753 case TR_ADDREQ_OK: 754 fprintf( stderr, "peer %d will take it\n", j ); 753 755 tr_bitfieldAdd( t->requested, block ); 754 756 j = peerCount;
Note: See TracChangeset
for help on using the changeset viewer.