Ignore:
Timestamp:
Feb 11, 2010, 3:12:03 AM (12 years ago)
Author:
charles
Message:

(trunk libT) revert part of r10064 at livings' request

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/announcer.c

    r10165 r10166  
    406406    t->announceIntervalSec = DEFAULT_ANNOUNCE_INTERVAL_SEC;
    407407    t->announceMinIntervalSec = DEFAULT_ANNOUNCE_MIN_INTERVAL_SEC;
    408     t->scrapeAt = now + tr_cryptoWeakRandInt( 60*10 );
     408    t->scrapeAt = now + tr_cryptoWeakRandInt( 60*5 );
    409409    t->tor = tor;
    410410
     
    11181118                       const char  * response,
    11191119                       size_t        responseLen,
    1120                        tr_bool       isStopped,
    11211120                       tr_bool     * gotScrape )
    11221121{
     
    11371136        const char * str;
    11381137        const uint8_t * raw;
     1138        tr_bool gotPeers = FALSE;
    11391139
    11401140        success = TRUE;
     
    11971197            const int allAreSeeds = incomplete == 0;
    11981198            peerCount += publishNewPeersCompact( tier, allAreSeeds, raw, rawlen );
     1199            gotPeers = TRUE;
    11991200        }
    12001201        else if( tr_bencDictFindList( &benc, "peers", &tmp ) )
     
    12051206            uint8_t * array = parseOldPeers( tmp, &byteCount );
    12061207            peerCount += publishNewPeers( tier, allAreSeeds, array, byteCount );
     1208            gotPeers = TRUE;
    12071209            tr_free( array );
    12081210        }
     
    12131215            const tr_bool allAreSeeds = incomplete == 0;
    12141216            peerCount += publishNewPeersCompact6( tier, allAreSeeds, raw, rawlen );
     1217            gotPeers = TRUE;
    12151218        }
    12161219
     
    12191222                        sizeof( tier->lastAnnounceStr ) );
    12201223
    1221         if( !isStopped )
     1224        if( gotPeers )
    12221225            tier->lastAnnouncePeerCount = peerCount;
    12231226    }
     
    12711274        if( responseCode == HTTP_OK )
    12721275        {
    1273             success = parseAnnounceResponse( tier, response, responseLen, isStopped, &gotScrape );
     1276            success = parseAnnounceResponse( tier, response, responseLen, &gotScrape );
    12741277            dbgmsg( tier, "success is %d", success );
    12751278
Note: See TracChangeset for help on using the changeset viewer.