Changeset 7284


Ignore:
Timestamp:
Dec 5, 2008, 4:04:07 PM (12 years ago)
Author:
charles
Message:

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

File:
1 edited

Legend:

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

    r7283 r7284  
    903903
    904904static void
    905 cancelAllRequestsToPeer( tr_peermsgs * msgs )
     905cancelAllRequestsToPeer( tr_peermsgs * msgs, int sendCancel )
    906906{
    907907    int i;
     
    917917    for( i=0; i<b.count; ++i ) {
    918918        fireCancelledReq( msgs, b.requests[i].index );
    919         protocolSendCancel( msgs, &b.requests[i] );
     919        if( sendCancel )
     920            protocolSendCancel( msgs, &b.requests[i] );
    920921    }
    921922
     
    13201321            dbgmsg( msgs, "got Choke" );
    13211322            msgs->info->clientIsChoked = 1;
    1322             cancelAllRequestsToPeer( msgs );
     1323            cancelAllRequestsToPeer( msgs, FALSE );
    13231324            cancelAllRequestsToClientExceptFast( msgs );
    13241325            break;
Note: See TracChangeset for help on using the changeset viewer.