1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 01:03:01 +00:00

Follow Azureus' and uTorrent's lead in not counting corrupt pieces in our announce data, as it could give us a misleadingly bad share ratio . (Ticket #263)

This commit is contained in:
Charles Kerr 2007-07-25 16:50:32 +00:00
parent d259e7b65a
commit 88d4df169b

View file

@ -350,6 +350,13 @@ static int parsePiece( tr_torrent_t * tor, tr_peer_t * peer,
/* Piece is complete, check it */
if( ( ret = tr_ioHash( tor->io, index ) ) )
{
/* Follow Azureus' and uTorrent's lead in not counting corrupt
pieces in our announce data, as it could give us a misleadingly
bad share ratio . (Ticket #263) */
const int byteCount = tr_pieceSize( index );
if( tor->downloadedCur >= byteCount )
tor->downloadedCur -= byteCount;
return ret;
}
if( !tr_cpPieceIsComplete( tor->completion, index ) )