Changeset 7060


Ignore:
Timestamp:
Nov 6, 2008, 4:16:53 AM (12 years ago)
Author:
charles
Message:

(libT) fix r7055 bug reported by BentMyWookie?. Also, narrow the bandwidth allocator's `clamp' range to lessen oscillation

File:
1 edited

Legend:

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

    r7055 r7060  
    10141014            tor->activityDate = now;
    10151015            tor->uploadedCur += e->length;
    1016             tr_rcTransferred ( peer->pieceSpeed[TR_CLIENT_TO_PEER], e->length );
     1016            if( peer )
     1017                tr_rcTransferred ( peer->pieceSpeed[TR_CLIENT_TO_PEER], e->length );
    10171018            tr_rcTransferred ( tor->pieceSpeed[TR_CLIENT_TO_PEER], e->length );
    10181019            tr_rcTransferred ( tor->session->pieceSpeed[TR_CLIENT_TO_PEER], e->length );
     
    10321033            tor->activityDate = now;
    10331034            tr_statsAddDownloaded( tor->session, e->length );
    1034             tr_rcTransferred ( peer->pieceSpeed[TR_PEER_TO_CLIENT], e->length );
     1035            if( peer )
     1036                tr_rcTransferred ( peer->pieceSpeed[TR_PEER_TO_CLIENT], e->length );
    10351037            tr_rcTransferred ( tor->pieceSpeed[TR_PEER_TO_CLIENT], e->length );
    10361038            tr_rcTransferred ( tor->session->pieceSpeed[TR_PEER_TO_CLIENT], e->length );
     
    23282330    const double baseline = desiredAvgKB * 1024.0 /
    23292331                            BANDWIDTH_PULSES_PER_SECOND;
    2330     const double min = baseline * 0.90;
    2331     const double max = baseline * 1.10;
     2332    const double min = baseline * 0.85;
     2333    const double max = baseline * 1.15;
    23322334    int          i;
    23332335    double       usedBytes;
Note: See TracChangeset for help on using the changeset viewer.