Changeset 6934


Ignore:
Timestamp:
Oct 20, 2008, 4:22:33 PM (12 years ago)
Author:
charles
Message:

(gtk) #1355: transmission blocks hibernation when torrents are paused

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/tr-core.c

    r6870 r6934  
    11801180    gboolean inhibit = pref_flag_get( PREF_KEY_INHIBIT_HIBERNATION );
    11811181
    1182     if( inhibit )
    1183     {
    1184         /* don't inhibit if we've got active torrents */
     1182    /* always allow hibernation when all the torrents are paused */
     1183    if( inhibit ) {
     1184        gboolean active = FALSE;
    11851185        tr_handle *  session = tr_core_handle( core );
    11861186        tr_torrent * tor = NULL;
    1187         while( ( tor = tr_torrentNext( session, tor ) ) )
    1188             if( tr_torrentGetStatus( tor ) != TR_STATUS_STOPPED )
    1189                 inhibit = FALSE;
     1187        while(( tor = tr_torrentNext( session, tor )))
     1188            if(( active = ( tr_torrentGetStatus( tor ) != TR_STATUS_STOPPED )))
     1189                break;
     1190        if( !active )
     1191            inhibit = FALSE;
    11901192    }
    11911193
Note: See TracChangeset for help on using the changeset viewer.