Ignore:
Timestamp:
Oct 28, 2007, 3:20:24 PM (15 years ago)
Author:
charles
Message:

#412 - 0.90 "ignores" speed limits (deanr, berkut, SineOtter?)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/ratecontrol.c

    r3105 r3615  
    113113}
    114114
     115size_t
     116tr_rcBytesLeft( const tr_ratecontrol * r )
     117{
     118    size_t bytes = 0;
     119
     120    if( r != NULL )
     121    {
     122        float cur, max;
     123        size_t kb;
     124 
     125        tr_lockLock( (tr_lock*)r->lock );
     126
     127        cur = rateForInterval( r, SHORT_INTERVAL_MSEC );
     128        max = r->limit;
     129        kb = max>cur ? max-cur : 0;
     130        bytes = kb * 1024u;
     131
     132        tr_lockUnlock( (tr_lock*)r->lock );
     133    }
     134
     135    return bytes;
     136}
     137
    115138float
    116139tr_rcRate( const tr_ratecontrol * r )
Note: See TracChangeset for help on using the changeset viewer.