Changeset 10483


Ignore:
Timestamp:
Apr 15, 2010, 1:43:54 PM (12 years ago)
Author:
charles
Message:

(trunk libT) #1869 "new status for torrents that reach seed ratio" -- possible fix for the bug reported by leena

Location:
trunk/libtransmission
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/peer-mgr.c

    r10415 r10483  
    13131313                peer->atom->piece_data_time = now;
    13141314
    1315             tor->needsSeedRatioCheck = TRUE;
    1316 
    13171315            break;
    13181316        }
     
    32973295    /* possibly stop torrents that have seeded enough */
    32983296    tor = NULL;
    3299     while(( tor = tr_torrentNext( mgr->session, tor ))) {
    3300         if( tor->needsSeedRatioCheck ) {
    3301             tor->needsSeedRatioCheck = FALSE;
    3302             tr_torrentCheckSeedRatio( tor );
    3303         }
    3304     }
     3297    while(( tor = tr_torrentNext( mgr->session, tor )))
     3298        tr_torrentCheckSeedRatio( tor );
    33053299
    33063300    /* run the completeness check for any torrents that need it */
  • trunk/libtransmission/session.c

    r10463 r10483  
    10211021***/
    10221022
    1023 static void
    1024 updateSeedRatio( tr_session * session )
    1025 {
    1026     tr_torrent * tor = NULL;
    1027 
    1028     while(( tor = tr_torrentNext( session, tor )))
    1029         tor->needsSeedRatioCheck = TRUE;
    1030 }
    1031 
    10321023void
    10331024tr_sessionSetRatioLimited( tr_session * session, tr_bool isLimited )
     
    10361027
    10371028    session->isRatioLimited = isLimited;
    1038     updateSeedRatio( session );
    10391029}
    10401030
     
    10451035
    10461036    session->desiredRatio = desiredRatio;
    1047     updateSeedRatio( session );
    10481037}
    10491038
  • trunk/libtransmission/torrent.c

    r10480 r10483  
    203203    {
    204204        tor->ratioLimitMode = mode;
    205         tor->needsSeedRatioCheck = TRUE;
    206205
    207206        tr_torrentSetDirty( tor );
     
    225224    {
    226225        tor->desiredRatio = desiredRatio;
    227 
    228         tor->needsSeedRatioCheck = TRUE;
    229226
    230227        tr_torrentSetDirty( tor );
     
    322319    assert( tr_isTorrent( tor ) );
    323320
    324     /* if we're seeding and we've reached our seed ratio limit, stop the torrent */
     321    /* if we're seeding and reach our seed ratio limit, stop the torrent */
    325322    if( tor->isRunning && tr_torrentIsSeedRatioDone( tor ) )
    326323    {
     
    13951392        const time_t now = tr_time( );
    13961393        tor->isRunning = TRUE;
    1397         tor->needsSeedRatioCheck = TRUE;
    13981394        tor->error = TR_STAT_OK;
    13991395        tor->errorString[0] = '\0';
     
    17141710
    17151711        tor->completeness = completeness;
    1716         tor->needsSeedRatioCheck = TRUE;
    17171712        tr_fdTorrentClose( tor->session, tor->uniqueId );
    17181713
     
    18971892
    18981893    tr_cpInvalidateDND( &tor->completion );
    1899     tor->needsSeedRatioCheck = TRUE;
    19001894
    19011895    tr_torrentUnlock( tor );
  • trunk/libtransmission/torrent.h

    r10347 r10483  
    228228    tr_bool                    isRunning;
    229229    tr_bool                    isDeleting;
    230     tr_bool                    needsSeedRatioCheck;
    231230    tr_bool                    startAfterVerify;
    232231    tr_bool                    isDirty;
Note: See TracChangeset for help on using the changeset viewer.