(trunk libT) more #1829

This commit is contained in:
Charles Kerr 2009-02-18 22:25:13 +00:00
parent f9e400a22d
commit 3ce4f44a6e
2 changed files with 4 additions and 3 deletions

View File

@ -818,6 +818,8 @@ refillPulse( void * vtorrent )
const uint32_t offset = getBlockOffsetInPiece( tor, block );
const uint32_t length = tr_torBlockCountBytes( tor, block );
assert( block < tor->blockCount );
/* find a peer who can ask for this block */
for( j=0; !handled && j<peerCount; )
{

View File

@ -718,7 +718,7 @@ tr_peerMsgsHave( tr_peermsgs * msgs,
***
**/
static int
static tr_bool
reqIsValid( const tr_peermsgs * peer,
uint32_t index,
uint32_t offset,
@ -727,7 +727,7 @@ reqIsValid( const tr_peermsgs * peer,
return tr_torrentReqIsValid( peer->torrent, index, offset, length );
}
static int
static tr_bool
requestIsValid( const tr_peermsgs * msgs, const struct peer_request * req )
{
return reqIsValid( msgs, req->index, req->offset, req->length );
@ -841,7 +841,6 @@ tr_peerMsgsAddRequest( tr_peermsgs * msgs,
assert( msgs );
assert( msgs->torrent );
assert( reqIsValid( msgs, index, offset, length ) );
/**
*** Reasons to decline the request