Ignore:
Timestamp:
Jul 1, 2012, 2:17:35 AM (10 years ago)
Author:
jordan
Message:

(trunk libT) #4402 "Transmission Bandwidth allocation getting overflows" -- use gvdl's patch '4402-uint-bpsoverflow.patch'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.c

    r13203 r13361  
    154154                                  tr_direction        direction )
    155155{
    156     int limit;
     156    unsigned int limit;
    157157    bool allowed = true;
    158158
     
    174174
    175175void
    176 tr_torrentSetSpeedLimit_Bps( tr_torrent * tor, tr_direction dir, int Bps )
     176tr_torrentSetSpeedLimit_Bps( tr_torrent * tor, tr_direction dir, unsigned int Bps )
    177177{
    178178    assert( tr_isTorrent( tor ) );
    179179    assert( tr_isDirection( dir ) );
    180     assert( Bps >= 0 );
    181180
    182181    if( tr_bandwidthSetDesiredSpeed_Bps( &tor->bandwidth, dir, Bps ) )
     
    184183}
    185184void
    186 tr_torrentSetSpeedLimit_KBps( tr_torrent * tor, tr_direction dir, int KBps )
     185tr_torrentSetSpeedLimit_KBps( tr_torrent * tor, tr_direction dir, unsigned int KBps )
    187186{
    188187    tr_torrentSetSpeedLimit_Bps( tor, dir, toSpeedBytes( KBps ) );
    189188}
    190189
    191 int
     190unsigned int
    192191tr_torrentGetSpeedLimit_Bps( const tr_torrent * tor, tr_direction dir )
    193192{
     
    197196    return tr_bandwidthGetDesiredSpeed_Bps( &tor->bandwidth, dir );
    198197}
    199 int
     198unsigned int
    200199tr_torrentGetSpeedLimit_KBps( const tr_torrent * tor, tr_direction dir )
    201200{
Note: See TracChangeset for help on using the changeset viewer.