Changeset 7273


Ignore:
Timestamp:
Dec 5, 2008, 1:12:54 AM (12 years ago)
Author:
charles
Message:

(1.4x libT) #1562: 1.40 sends unnecessary `cancel' messages when choked

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.4x/libtransmission/peer-msgs.c

    r7221 r7273  
    922922
    923923static void
    924 cancelAllRequestsToPeer( tr_peermsgs * msgs )
     924cancelAllRequestsToPeer( tr_peermsgs * msgs, tr_bool sendCancel )
    925925{
    926926    int                 i;
     
    937937    for( i = 0; i < b.count; ++i ) {
    938938        fireCancelledReq( msgs, &b.requests[i] );
    939         protocolSendCancel( msgs, &b.requests[i] );
     939        if( sendCancel )
     940            protocolSendCancel( msgs, &b.requests[i] );
    940941    }
    941942
     
    14091410            dbgmsg( msgs, "got Choke" );
    14101411            msgs->info->clientIsChoked = 1;
    1411             cancelAllRequestsToPeer( msgs );
    1412             cancelAllRequestsToClientExceptFast( msgs );
     1412            cancelAllRequestsToPeer( msgs, FALSE );
    14131413            break;
    14141414
Note: See TracChangeset for help on using the changeset viewer.