mirror of
https://github.com/transmission/transmission
synced 2025-02-21 21:57:01 +00:00
(trunk libT) more #1829
This commit is contained in:
parent
f9e400a22d
commit
3ce4f44a6e
2 changed files with 4 additions and 3 deletions
|
@ -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; )
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue