Ignore:
Timestamp:
Sep 25, 2010, 12:34:15 AM (11 years ago)
Author:
Longinus00
Message:

(libT) #3453:Torrent does not stop when set per torrent seed ratio is reached before torrent is completed
(libT) #3578:Interested flag isn't cleared when transitioning from leeching to seeding

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.c

    r11243 r11264  
    16001600    /* if the torrent's running, stop it & set the restart-after-verify flag */
    16011601    if( tor->startAfterVerify || tor->isRunning ) {
     1602        /* don't clobber isStopping */
     1603        const tr_bool startAfter = tor->isStopping ? FALSE : TRUE;
    16021604        tr_torrentStop( tor );
    1603         tor->startAfterVerify = TRUE;
     1605        tor->startAfterVerify = startAfter;
    16041606    }
    16051607
     
    18481850tr_torrentRecheckCompleteness( tr_torrent * tor )
    18491851{
    1850     tr_bool wasRunning;
    18511852    tr_completeness completeness;
    18521853
     
    18561857
    18571858    completeness = tr_cpGetStatus( &tor->completion );
    1858     wasRunning = tor->isRunning;
    18591859
    18601860    if( completeness != tor->completeness )
    18611861    {
    18621862        const int recentChange = tor->downloadedCur != 0;
     1863        const tr_bool wasLeeching = !tr_torrentIsSeed( tor );
     1864        const tr_bool wasRunning = tor->isRunning;
    18631865
    18641866        if( recentChange )
     
    18781880                tr_announcerTorrentCompleted( tor );
    18791881                tor->doneDate = tor->anyDate = tr_time( );
     1882            }
     1883
     1884            if( wasLeeching && wasRunning )
     1885            {
     1886                /* clear interested flag on all peers */
     1887                tr_peerMgrClearInterest( tor );
     1888
     1889                /* if completeness was TR_LEECH then the seed limit check will have been skipped in bandwidthPulse */
     1890                tr_torrentCheckSeedLimit( tor );
    18801891            }
    18811892
Note: See TracChangeset for help on using the changeset viewer.