#781: try to get a little further on this `too much corrupt' ticket by adding a more helpful log message when a downloaded piece fails its checksum test.

This commit is contained in:
Charles Kerr 2008-03-18 01:39:06 +00:00
parent 0437c5f33e
commit 59fdf5dcc8
1 changed files with 5 additions and 0 deletions

View File

@ -1533,6 +1533,11 @@ clientGotBlock( tr_peermsgs * msgs,
{
const tr_errno err = tr_ioTestPiece( tor, req->index );
if( err )
tr_torerr( tor, _( "Downloaded piece %lu failed its checksum test: %s" ),
(unsigned long)req->index,
tr_errorString( err ) );
tr_torrentSetHasPiece( tor, req->index, !err );
tr_torrentSetPieceChecked( tor, req->index, TRUE );
tr_peerMgrSetBlame( tor->handle->peerMgr, tor->info.hash, req->index, !err );