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

File:
1 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    }
Note: See TracChangeset for help on using the changeset viewer.