Changeset 7274


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

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

File:
1 edited

Legend:

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

    r7257 r7274  
    10131013
    10141014static void
    1015 cancelAllRequestsToPeer( tr_peermsgs * msgs )
     1015cancelAllRequestsToPeer( tr_peermsgs * msgs, tr_bool sendCancel )
    10161016{
    10171017    int                 i;
     
    10281028    for( i = 0; i < b.count; ++i ) {
    10291029        fireCancelledReq( msgs, &b.requests[i] );
    1030         protocolSendCancel( msgs, &b.requests[i] );
     1030        if( sendCancel )
     1031            protocolSendCancel( msgs, &b.requests[i] );
    10311032    }
    10321033
     
    14741475            msgs->info->clientIsChoked = 1;
    14751476            if( !fext )
    1476                 cancelAllRequestsToPeer( msgs );
    1477             cancelAllRequestsToClient( msgs );
     1477                cancelAllRequestsToPeer( msgs, FALSE );
    14781478            break;
    14791479
Note: See TracChangeset for help on using the changeset viewer.