Changeset 12955


Ignore:
Timestamp:
Oct 9, 2011, 12:18:18 AM (11 years ago)
Author:
jordan
Message:

(trunk libT) #4526 "do not skip scrape unless all three scrape fields came with announce" -- fixed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/announcer.c

    r12683 r12955  
    10731073            int i;
    10741074            const char * str;
    1075             bool got_scrape_info = false;
     1075            int scrape_fields = 0;
    10761076            const bool isStopped = event == TR_ANNOUNCE_EVENT_STOPPED;
    10771077
     
    10821082                tracker->consecutiveFailures = 0;
    10831083
    1084                 /* if the tracker included scrape fields in its announce response,
    1085                    then a separate scrape isn't needed */
    1086 
    1087                 got_scrape_info = response->seeders
    1088                                || response->leechers
    1089                                || response->downloads;
    1090 
    1091                 if( got_scrape_info )
     1084                if( response->seeders >= 0 )
    10921085                {
    10931086                    tracker->seederCount = response->seeders;
     1087                    ++scrape_fields;
     1088                }
     1089
     1090                if( response->leechers >= 0 )
     1091                {
    10941092                    tracker->leecherCount = response->leechers;
     1093                    ++scrape_fields;
     1094                }
     1095                if( response->downloads >= 0 )
     1096                {
    10951097                    tracker->downloadCount = response->downloads;
     1098                    ++scrape_fields;
    10961099                }
    10971100
     
    11311134            tier->isRunning = data->isRunningOnSuccess;
    11321135
    1133             if( got_scrape_info )
     1136            /* if the tracker included scrape fields in its announce response,
     1137               then a separate scrape isn't needed */
     1138            if( scrape_fields >= 3 )
    11341139            {
    11351140                tr_tordbg( tier->tor, "Announce response contained scrape info; "
Note: See TracChangeset for help on using the changeset viewer.