Changeset 10983


Ignore:
Timestamp:
Jul 8, 2010, 11:38:57 PM (12 years ago)
Author:
charles
Message:

(trunk libT) #1521 "memory cache to reduce disk IO" -- whoops, I missed these parts from Longinus' patch in r10978

Location:
trunk/libtransmission
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/cache.h

    r10931 r10983  
    5959****
    6060***/
     61int tr_cacheFlushDone( tr_cache * cache );
    6162
    6263int tr_cacheFlushTorrent( tr_cache    * cache,
  • trunk/libtransmission/session.c

    r10972 r10983  
    360360    tr_bencDictAddStr ( d, TR_PREFS_KEY_SCRIPT_TORRENT_DONE_FILENAME, tr_sessionGetTorrentDoneScript( s ) );
    361361    tr_bencDictAddBool( d, TR_PREFS_KEY_ALT_SPEED_ENABLED,        tr_sessionUsesAltSpeed( s ) );
    362     tr_bencDictAddInt ( d, TR_PREFS_KEY_ALT_SPEED_UP_KBps,         tr_sessionGetAltSpeed_KBps( s, TR_UP ) );
    363     tr_bencDictAddInt ( d, TR_PREFS_KEY_ALT_SPEED_DOWN_KBps,       tr_sessionGetAltSpeed_KBps( s, TR_DOWN ) );
     362    tr_bencDictAddInt ( d, TR_PREFS_KEY_ALT_SPEED_UP_KBps,        tr_sessionGetAltSpeed_KBps( s, TR_UP ) );
     363    tr_bencDictAddInt ( d, TR_PREFS_KEY_ALT_SPEED_DOWN_KBps,      tr_sessionGetAltSpeed_KBps( s, TR_DOWN ) );
    364364    tr_bencDictAddInt ( d, TR_PREFS_KEY_ALT_SPEED_TIME_BEGIN,     tr_sessionGetAltSpeedBegin( s ) );
    365365    tr_bencDictAddBool( d, TR_PREFS_KEY_ALT_SPEED_TIME_ENABLED,   tr_sessionUsesAltSpeedTime( s ) );
    366366    tr_bencDictAddInt ( d, TR_PREFS_KEY_ALT_SPEED_TIME_END,       tr_sessionGetAltSpeedEnd( s ) );
    367367    tr_bencDictAddInt ( d, TR_PREFS_KEY_ALT_SPEED_TIME_DAY,       tr_sessionGetAltSpeedDay( s ) );
    368     tr_bencDictAddInt ( d, TR_PREFS_KEY_USPEED_KBps,               tr_sessionGetSpeedLimit_KBps( s, TR_UP ) );
     368    tr_bencDictAddInt ( d, TR_PREFS_KEY_USPEED_KBps,              tr_sessionGetSpeedLimit_KBps( s, TR_UP ) );
    369369    tr_bencDictAddBool( d, TR_PREFS_KEY_USPEED_ENABLED,           tr_sessionIsSpeedLimited( s, TR_UP ) );
    370370    tr_bencDictAddInt ( d, TR_PREFS_KEY_UMASK,                    s->umask );
     
    471471    tr_torrent * tor = NULL;
    472472    tr_session * session = vsession;
     473
     474    if( tr_cacheFlushDone( session->cache ) )
     475        tr_err( "Error while flushing completed pieces from cache" );
    473476
    474477    while(( tor = tr_torrentNext( session, tor )))
Note: See TracChangeset for help on using the changeset viewer.