Changeset 12199


Ignore:
Timestamp:
Mar 21, 2011, 4:42:32 PM (11 years ago)
Author:
jordan
Message:

(trunk libT) discard out-of-range reject messages from peers.

File:
1 edited

Legend:

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

    r12112 r12199  
    16721672            break;
    16731673
    1674         case TR_PEER_CLIENT_GOT_REJ:
    1675             removeRequestFromTables( t, _tr_block( t->tor, e->pieceIndex, e->offset ), peer );
     1674        case TR_PEER_CLIENT_GOT_REJ: {
     1675            tr_block_index_t b = _tr_block( t->tor, e->pieceIndex, e->offset );
     1676            if( b < t->tor->blockCount )
     1677                removeRequestFromTables( t, b, peer );
     1678            else
     1679                tordbg( t, "Peer %s sent an out-of-range reject message",
     1680                           tr_atomAddrStr( peer->atom ) );
    16761681            break;
     1682        }
    16771683
    16781684        case TR_PEER_CLIENT_GOT_CHOKE:
Note: See TracChangeset for help on using the changeset viewer.