Ignore:
Timestamp:
Jan 8, 2007, 9:53:55 PM (16 years ago)
Author:
livings124
Message:

global bandwidth limits only apply to transfers that are not set to overide them

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/peer.c

    r1288 r1320  
    267267    for( ;; )
    268268    {
    269         if( tor && (!tr_rcCanTransfer( tor->globalDownload )
    270                     || !tr_rcCanTransfer( tor->download ) ) )
     269        if( tor && ( ( !tor->customSpeedLimit && !tr_rcCanGlobalTransfer( tor->handle, 0 ) )
     270            || ( tor->customSpeedLimit && !tr_rcCanTransfer( tor->download ) ) ) )
    271271        {
    272272            break;
     
    302302            tr_rcTransferred( peer->download, ret );
    303303            tr_rcTransferred( tor->download, ret );
    304             tr_rcTransferred( tor->globalDownload, ret );
    305304            if( parseBuf( tor, peer ) )
    306305            {
     
    438437        while( ( p = blockPending( tor, peer, &size ) ) )
    439438        {
    440             if( !tr_rcCanTransfer( tor->globalUpload )
    441                 || !tr_rcCanTransfer( tor->upload ) )
     439            if( ( !tor->customSpeedLimit && !tr_rcCanGlobalTransfer( tor->handle, 1 ) )
     440                    || ( tor->customSpeedLimit && !tr_rcCanTransfer( tor->upload ) ) )
    442441            {
    443442                break;
     
    457456            tr_rcTransferred( peer->upload, ret );
    458457            tr_rcTransferred( tor->upload, ret );
    459             tr_rcTransferred( tor->globalUpload, ret );
    460458
    461459            tor->uploadedCur += ret;
Note: See TracChangeset for help on using the changeset viewer.