Ignore:
Timestamp:
Mar 7, 2010, 5:38:34 PM (12 years ago)
Author:
charles
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/peer-msgs.c

    r10302 r10325  
    16041604    }
    16051605
    1606     /* save the block */
    16071606    dbgmsg( msgs, "got block %u:%u->%u", req->index, req->offset, req->length );
    16081607
    16091608    if( !tr_peerMgrDidPeerRequest( msgs->torrent, msgs->peer, block ) ) {
    16101609        dbgmsg( msgs, "we didn't ask for this message..." );
     1610        return 0;
     1611    }
     1612    if( tr_cpPieceIsComplete( &msgs->torrent->completion, req->index ) ) {
     1613        dbgmsg( msgs, "we did ask for this message, but the piece is already complete..." );
    16111614        return 0;
    16121615    }
Note: See TracChangeset for help on using the changeset viewer.