1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-26 09:37:56 +00:00

(trunk libT) #1242 "don't accept duplicate blocks during endgame" -- fixed in trunk for 1.92

This commit is contained in:
Charles Kerr 2010-03-07 17:38:34 +00:00
parent c6a76932b2
commit 6b546e8b4b

View file

@ -1603,13 +1603,16 @@ clientGotBlock( tr_peermsgs * msgs,
return EMSGSIZE;
}
/* save the block */
dbgmsg( msgs, "got block %u:%u->%u", req->index, req->offset, req->length );
if( !tr_peerMgrDidPeerRequest( msgs->torrent, msgs->peer, block ) ) {
dbgmsg( msgs, "we didn't ask for this message..." );
return 0;
}
if( tr_cpPieceIsComplete( &msgs->torrent->completion, req->index ) ) {
dbgmsg( msgs, "we did ask for this message, but the piece is already complete..." );
return 0;
}
/**
*** Save the block