Changeset 8093


Ignore:
Timestamp:
Mar 27, 2009, 1:39:35 AM (13 years ago)
Author:
charles
Message:

(trunk) fix a bug with the new libT alt speed limit code

Location:
trunk/libtransmission
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/session.c

    r8089 r8093  
    837837    int minutes;
    838838
     839    if( !tr_sessionIsAltSpeedLimitEnabled( session ) )
     840        return FALSE;
     841
    839842    tr_localtime_r( &now, &tm );
    840843    minutes = tm.tm_hour*60 + tm.tm_min;
     
    893896    session->isAltTime = isAltTime( session );
    894897
    895     if( tr_sessionIsAltSpeedLimitEnabled( session ) && ( wasAltTime != session->isAltTime ) )
     898    if( wasAltTime != session->isAltTime )
    896899    {
    897900        updateBandwidth( session, TR_UP );
     
    945948
    946949    return session->speedLimit[dir];
    947 }
    948 
    949 tr_bool
    950 tr_sessionIsAltSpeedLimitTime( const tr_session  * session )
    951 {
    952     assert( tr_isSession( session ) );
    953 
    954     return session->isAltTime;
    955950}
    956951
  • trunk/libtransmission/transmission.h

    r8090 r8093  
    600600tr_bool    tr_sessionIsAltSpeedLimitEnabled( const tr_session  * session );
    601601
    602 /** @return true if the current time is between the alt begin and end times */
    603 tr_bool    tr_sessionIsAltSpeedLimitTime( const tr_session  * session );
    604 
    605602void       tr_sessionSetAltSpeedLimitBegin( tr_session * session,
    606603                                            int          minutesSinceMidnight );
Note: See TracChangeset for help on using the changeset viewer.