Changeset 10716


Ignore:
Timestamp:
Jun 3, 2010, 4:37:50 PM (12 years ago)
Author:
charles
Message:

(trunk libT) #3258 "Transmission 1.93 sends 'stopped'+'started' announce instead of 'completed' if the incomplete-dir is enabled" -- probable fix

Location:
trunk/libtransmission
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/announcer.c

    r10697 r10716  
    15371537    assert( tr_isTorrent( tier->tor ) );
    15381538
    1539     /* special case #1: if "stopped" is in the queue, ignore everything before it */
    15401539    events = (const char**) tr_ptrArrayPeek( &tier->announceEvents, &n );
     1540
     1541    /* special case #1: if "stopped" is in the queue,
     1542     * ignore everything before it except "completed" */
    15411543    if( pos == -1 ) {
    1542         for( i=0; i<n; ++i )
     1544        tr_bool completed = FALSE;
     1545        for( i = 0; i < n; ++i ) {
     1546            if( !strcmp( events[i], "completed" ) )
     1547                completed = TRUE;
    15431548            if( !strcmp( events[i], "stopped" ) )
    15441549                break;
    1545         if( i <  n )
     1550        }
     1551        if( !completed && ( i <  n ) )
    15461552            pos = i;
    15471553    }
  • trunk/libtransmission/torrent.c

    r10694 r10716  
    17241724        if( tr_torrentIsSeed( tor ) )
    17251725        {
     1726            if( recentChange )
     1727            {
     1728                tr_announcerTorrentCompleted( tor );
     1729                tor->doneDate = tor->anyDate = tr_time( );
     1730            }
     1731
    17261732            tr_torrentCheckSeedRatio( tor );
    17271733
     
    17341740
    17351741        fireCompletenessChange( tor, completeness );
    1736 
    1737         if( recentChange && tr_torrentIsSeed( tor ) )
    1738         {
    1739             tr_announcerTorrentCompleted( tor );
    1740 
    1741             tor->doneDate = tor->anyDate = tr_time( );
    1742         }
    17431742
    17441743        tr_torrentSetDirty( tor );
Note: See TracChangeset for help on using the changeset viewer.