Changeset 5200


Ignore:
Timestamp:
Mar 4, 2008, 9:09:26 PM (14 years ago)
Author:
charles
Message:

remove more unused code in the peer-msgs module

File:
1 edited

Legend:

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

    r5199 r5200  
    260260    uint8_t ut_pex_id;
    261261    uint16_t pexCount;
    262     uint32_t maxActiveRequests;
    263     uint32_t minActiveRequests;
     262    uint16_t maxActiveRequests;
     263    uint16_t minActiveRequests;
    264264
    265265    tr_peer * info;
     
    271271    tr_publisher_t * publisher;
    272272
    273     struct evbuffer * outBlock;    /* buffer of all the current piece message */
     273    struct evbuffer * outBlock;    /* buffer of the current piece message */
    274274    struct evbuffer * outMessages; /* buffer of all the non-piece messages */
    275275
     
    283283    tr_timer * pexTimer;
    284284
    285     time_t lastReqAddedAt;
    286285    time_t clientSentPexAt;
    287286    time_t clientSentAnythingAt;
    288287   
    289     tr_bitfield * clientAllowedPieces;
    290288    tr_bitfield * peerAllowedPieces;
    291     tr_bitfield * clientSuggestedPieces;
    292289
    293290    struct tr_incoming incoming;
     
    755752
    756753        protocolSendRequest( msgs, &req );
    757         req.time_requested = msgs->lastReqAddedAt = now;
     754        req.time_requested = now;
    758755        reqListAppend( &msgs->clientAskedFor, &req );
    759756
     
    13241321            if( tr_bitfieldAdd( msgs->info->have, ui32 ) )
    13251322                fireError( msgs, TR_ERROR_PEER_MESSAGE );
    1326             /* If this is a fast-allowed piece for this peer, mark it as normal now */
    1327             if( msgs->clientAllowedPieces != NULL && tr_bitfieldHas( msgs->clientAllowedPieces, ui32 ) )
    1328                 if( tr_bitfieldRem( msgs->clientAllowedPieces, ui32 ) )
    1329                     fireError( msgs, TR_ERROR_PEER_MESSAGE );
    13301323            updatePeerProgress( msgs );
    13311324            tr_rcTransferred( msgs->torrent->swarmspeed, msgs->torrent->info.pieceSize );
     
    13771370            dbgmsg( msgs, "Got a BT_SUGGEST" );
    13781371            tr_peerIoReadUint32( msgs->io, inbuf, &ui32 );
    1379             if( tr_cpPieceIsComplete( msgs->torrent->completion, ui32 ) )
    1380                 if( tr_bitfieldAdd( msgs->clientSuggestedPieces, ui32 ) )
    1381                     fireError( msgs, TR_ERROR_PEER_MESSAGE );
     1372            /* we don't do anything with this yet */
    13821373            break;
    13831374        }
     
    14111402            dbgmsg( msgs, "Got a BT_ALLOWED_FAST" );
    14121403            tr_peerIoReadUint32( msgs->io, inbuf, &ui32 );
    1413             if( tr_bitfieldAdd( msgs->clientAllowedPieces, ui32 ) )
    1414                 fireError( msgs, TR_ERROR_PEER_MESSAGE );
     1404            /* we don't do anything with this yet */
    14151405            break;
    14161406        }
     
    19701960    m->clientAskedFor = REQUEST_LIST_INIT;
    19711961    m->clientWillAskFor = REQUEST_LIST_INIT;
    1972     m->clientAllowedPieces = tr_bitfieldNew( m->torrent->info.pieceCount );
    1973     m->clientSuggestedPieces = tr_bitfieldNew( m->torrent->info.pieceCount );
    19741962    *setme = tr_publisherSubscribe( m->publisher, func, userData );
    19751963
     
    20132001        reqListClear( &msgs->peerAskedFor );
    20142002        tr_bitfieldFree( msgs->peerAllowedPieces );
    2015         tr_bitfieldFree( msgs->clientAllowedPieces );
    2016         tr_bitfieldFree( msgs->clientSuggestedPieces );
    20172003        evbuffer_free( msgs->incoming.block );
    20182004        evbuffer_free( msgs->outMessages );
Note: See TracChangeset for help on using the changeset viewer.