Changeset 1182


Ignore:
Timestamp:
Dec 11, 2006, 1:21:45 AM (15 years ago)
Author:
livings124
Message:

small changes to branch

File:
1 edited

Legend:

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

    r1181 r1182  
    8787    benc_val_t   meta, * beInfo, * list, * val, * sublist;
    8888    char       * address, * announce;
    89     int          i, j, k, tiersSet, tiers, inTier, port, random;
     89    int          i, j, k, tiersSet, inTier, port, random;
    9090    struct stat sb;
    9191    tr_announce_list_item_t * announceItem, * prevAnnounceItem, * nextAnnounceItem;
     
    315315        tiersSet = 1;
    316316       
    317         tiers = 0;
     317        inf->trackerAnnounceTiers = 0;
    318318        for( i = 0; i < val->val.l.count; i++ )
    319319        {
     
    331331                random = tr_rand( inTier+1 );
    332332               
    333                 announceItem = calloc( sizeof( tr_announce_list_item_t ), 1 );
    334333                prevAnnounceItem = 0;
    335                 nextAnnounceItem = inf->trackerAnnounceList[tiers];
     334                nextAnnounceItem = inf->trackerAnnounceList[inf->trackerAnnounceTiers];
    336335                for( k = 0; k < random; k++ )
    337336                {
     
    340339                }
    341340               
     341                announceItem = calloc( sizeof( tr_announce_list_item_t ), 1 );
    342342                announceItem->nextItem = nextAnnounceItem;
    343343                if( prevAnnounceItem )
     
    347347                else
    348348                {
    349                     inf->trackerAnnounceList[tiers] = announceItem;
     349                    inf->trackerAnnounceList[inf->trackerAnnounceTiers] = announceItem;
    350350                }
    351351               
     
    361361            if( inTier > 0 )
    362362            {
    363                 tiers++;
     363                inf->trackerAnnounceTiers++;
    364364            }
    365365        }
    366        
    367         inf->trackerAnnounceTiers = tiers;
    368366    }
    369367   
     
    412410            inf->trackerAnnounceList = calloc( sizeof( int ), 1 );
    413411        }
     412        inf->trackerAnnounceTiers = 1;
     413       
    414414        inf->trackerAnnounceList[0] = calloc( sizeof( tr_announce_list_item_t ), 1 );
    415        
    416         inf->trackerAnnounceTiers = 1;
    417415        snprintf( inf->trackerAnnounceList[0]->address, 256, "%s", address );
    418416        inf->trackerAnnounceList[0]->port = port;
Note: See TracChangeset for help on using the changeset viewer.