Changeset 7242


Ignore:
Timestamp:
Dec 2, 2008, 11:27:45 PM (12 years ago)
Author:
charles
Message:

(libT) #1454: List of files selection/priority resetting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.c

    r7238 r7242  
    17201720        tr_bencDictAddStr( &metainfo, "announce", trackers[0].announce );
    17211721        announceList = tr_bencDictAddList( &metainfo, "announce-list", 0 );
    1722         for( i = 0; i < trackerCount; ++i )
    1723         {
    1724             if( prevTier != trackers[i].tier )
    1725             {
     1722        for( i = 0; i < trackerCount; ++i ) {
     1723            if( prevTier != trackers[i].tier ) {
    17261724                prevTier = trackers[i].tier;
    17271725                tier = tr_bencListAddList( announceList, 0 );
     
    17341732        if( !tr_metainfoParse( tor->session, &tmpInfo, &metainfo ) )
    17351733        {
    1736             /* if it's good, save it and use it */
    1737             tr_metainfoFree( &tor->info );
    1738             tor->info = tmpInfo;
    1739             tr_torrentInitFilePieces( tor );
     1734            /* it's good, so keep these new trackers and free the old ones */
     1735
     1736            tr_info swap;
     1737            swap.trackers = tor->info.trackers;
     1738            swap.trackerCount = tor->info.trackerCount;
     1739            tor->info.trackers = tmpInfo.trackers;
     1740            tor->info.trackerCount = tmpInfo.trackerCount;
     1741            tmpInfo.trackers = swap.trackers;
     1742            tmpInfo.trackerCount = swap.trackerCount;
     1743
     1744            tr_metainfoFree( &tmpInfo );
    17401745            tr_bencSaveFile( tor->info.torrent, &metainfo );
    17411746        }
Note: See TracChangeset for help on using the changeset viewer.