1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-16 08:49:47 +00:00

(trunk gtk) #3295 "transmission updates the blocklist even when the blocklist is disabled" -- fixed in trunk for 2.00

This commit is contained in:
Charles Kerr 2010-06-15 15:35:40 +00:00
parent d930b4d781
commit 0eccb5a477

View file

@ -644,9 +644,15 @@ main( int argc, char ** argv )
tr_sessionSetRPCCallback( session, onRPCChanged, cbdata );
/* on startup, check & see if it's time to update the blocklist */
if( pref_flag_get( PREF_KEY_BLOCKLIST_UPDATES_ENABLED )
&& ( time( NULL ) - pref_int_get( "blocklist-date" ) > ( 60 * 60 * 24 * 7 ) ) )
tr_core_blocklist_update( cbdata->core );
if( pref_flag_get( TR_PREFS_KEY_BLOCKLIST_ENABLED ) ) {
if( pref_flag_get( PREF_KEY_BLOCKLIST_UPDATES_ENABLED ) ) {
const int64_t last_time = pref_int_get( "blocklist-date" );
const int SECONDS_IN_A_WEEK = 7 * 24 * 60 * 60;
const time_t now = time( NULL );
if( last_time + SECONDS_IN_A_WEEK < now )
tr_core_blocklist_update( cbdata->core );
}
}
/* if there's no magnet link handler registered, register us */
registerMagnetLinkHandler( );