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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/announcer.c

    r12956 r12982  
    10741074            const char * str;
    10751075            int scrape_fields = 0;
     1076            int seeders = 0;
     1077            int leechers = 0;
     1078            int downloads = 0;
    10761079            const bool isStopped = event == TR_ANNOUNCE_EVENT_STOPPED;
    10771080
     
    10841087                if( response->seeders >= 0 )
    10851088                {
    1086                     tracker->seederCount = response->seeders;
     1089                    tracker->seederCount = seeders = response->seeders;
    10871090                    ++scrape_fields;
    10881091                }
     
    10901093                if( response->leechers >= 0 )
    10911094                {
    1092                     tracker->leecherCount = response->leechers;
     1095                    tracker->leecherCount = leechers = response->leechers;
    10931096                    ++scrape_fields;
    10941097                }
    10951098                if( response->downloads >= 0 )
    10961099                {
    1097                     tracker->downloadCount = response->downloads;
     1100                    tracker->downloadCount = downloads = response->downloads;
    10981101                    ++scrape_fields;
    10991102                }
     
    11261129
    11271130            if( response->pex_count > 0 )
    1128                 publishPeersPex( tier, response->seeders, response->leechers,
     1131                publishPeersPex( tier, seeders, leechers,
    11291132                                 response->pex, response->pex_count );
    11301133
    11311134            if( response->pex6_count > 0 )
    1132                 publishPeersPex( tier, response->seeders, response->leechers,
     1135                publishPeersPex( tier, seeders, leechers,
    11331136                                 response->pex6, response->pex6_count );
    11341137
     
    13471350                    if(( tracker = tier->currentTracker ))
    13481351                    {
    1349                         tracker->seederCount = row->seeders;
    1350                         tracker->leecherCount = row->leechers;
    1351                         tracker->downloadCount = row->downloads;
     1352                        if( row->seeders >= 0 )
     1353                            tracker->seederCount = row->seeders;
     1354                        if( row->leechers >= 0 )
     1355                            tracker->leecherCount = row->leechers;
     1356                        if( row->downloads >= 0 )
     1357                            tracker->downloadCount = row->downloads;
    13521358                        tracker->downloaderCount = row->downloaders;
    13531359                        tracker->consecutiveFailures = 0;
Note: See TracChangeset for help on using the changeset viewer.