Ignore:
Timestamp:
Feb 7, 2010, 5:13:38 PM (12 years ago)
Author:
charles
Message:

(trunk libT) #2874 "Since 10094 The Schedule Speed Limit Not Working" -- fixed in trunk for 1.90

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/session.c

    r10124 r10129  
    10741074turtleFindNextChange( struct tr_turtle_info * t )
    10751075{
     1076    int day;
    10761077    struct tm tm;
    10771078    time_t today_began_at;
     
    11051106       if the next change is tomorrow to turn limits ON, look for tomorrow in t->days. */
    11061107    if( t->_nextChangeValue && (( t->_nextChangeAt >= today_began_at + SECONDS_PER_DAY )))
    1107         t->_nextChangeAllowed = ( t->days & ( ( tm.tm_wday + 1 ) % 7 ) ) != 0;
     1108        day = ( tm.tm_wday + 1 ) % 7;
    11081109    else
    1109         t->_nextChangeAllowed = ( t->days & tm.tm_wday ) != 0;
     1110        day = tm.tm_wday;
     1111    t->_nextChangeAllowed = ( t->days & (1<<day) ) != 0;
    11101112
    11111113    if( t->isClockEnabled && t->_nextChangeAllowed ) {
     
    11131115        tr_localtime_r( &t->_nextChangeAt, &tm );
    11141116        strftime( buf, sizeof( buf ), "%a %b %d %T %Y", &tm );
    1115         tr_dbg( "Turtle clock updated: at %s we'll turn limits %s", buf, (t->_nextChangeValue?"on":"off") );
     1117        tr_inf( "Turtle clock updated: at %s we'll turn limits %s", buf, (t->_nextChangeValue?"on":"off") );
    11161118    }
    11171119}
Note: See TracChangeset for help on using the changeset viewer.