Changeset 1212


Ignore:
Timestamp:
Dec 14, 2006, 6:41:12 AM (15 years ago)
Author:
livings124
Message:

simplify check

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/multitracker/libtransmission/tracker.c

    r1208 r1212  
    186186static void failureAnnouncing( tr_tracker_t * tc )
    187187{
    188     tr_torrent_t * tor = tc->tor;
    189188    tr_info_t    * inf = &tor->info;
    190189   
    191     int i;
    192     tr_announce_list_ptr_t * announcePtr;
    193    
    194     tc->shouldChangeAnnounce = 1;
    195    
    196     /* If more tiers then announce can definitely be changed */
    197     if( tc->announceTier + 1 < inf->trackerTiers )
    198     {
    199         return;
    200     }
    201    
    202     /* If there are no more trackers don't try to change the announce */
    203     announcePtr = tc->trackerAnnounceListPtr[tc->announceTier];
    204     for( i = 0; i <= tc->announceTierLast; i++ )
    205     {
    206         announcePtr = announcePtr->nextItem;
    207     }
    208    
    209     if( announcePtr == NULL )
    210     {
    211         tc->shouldChangeAnnounce = 0;
    212     }
     190    tc->shouldChangeAnnounce = tc->announceTier + 1 < inf->trackerTiers
     191                                || tc->announceTierLast + 1 < inf->trackerList[tc->announceTier].count;
    213192}
    214193
Note: See TracChangeset for help on using the changeset viewer.