Ignore:
Timestamp:
Mar 8, 2010, 4:29:58 AM (12 years ago)
Author:
charles
Message:

(trunk) #2993 "'Downloaded' much greater than 'Have' or 'verified'" -- add new congestion-based throttle for 2.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.c

    r10308 r10332  
    611611    static int nextUniqueId = 1;
    612612    tr_session * session = tr_ctorGetSession( ctor );
     613    const int sec = TORRENT_DOWNLOAD_CONGESTION_HISTORY_SEC;
    613614
    614615    assert( session != NULL );
     
    619620    tor->uniqueId = nextUniqueId++;
    620621    tor->magicNumber = TORRENT_MAGIC_NUMBER;
     622
     623    tor->blocksSentToClient  = tr_historyNew( sec, 1 );
     624    tor->blocksSentToPeer    = tr_historyNew( sec, 1 );
     625    tor->cancelsSentToClient = tr_historyNew( sec, 1 );
     626    tor->cancelsSentToPeer   = tr_historyNew( sec, 1 );
    621627
    622628    tr_sha1( tor->obfuscatedHash, "req2", 4,
     
    12911297
    12921298    tr_bitfieldDestruct( &tor->checkedPieces );
     1299
     1300    tr_historyFree( tor->blocksSentToClient  );
     1301    tr_historyFree( tor->blocksSentToPeer    );
     1302    tr_historyFree( tor->cancelsSentToClient );
     1303    tr_historyFree( tor->cancelsSentToPeer   );
    12931304
    12941305    tr_free( tor->downloadDir );
Note: See TracChangeset for help on using the changeset viewer.