Changeset 7243


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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.4x/libtransmission/torrent.c

    r7176 r7243  
    17171717        tr_bencDictAddStr( &metainfo, "announce", trackers[0].announce );
    17181718        announceList = tr_bencDictAddList( &metainfo, "announce-list", 0 );
    1719         for( i = 0; i < trackerCount; ++i )
    1720         {
    1721             if( prevTier != trackers[i].tier )
    1722             {
     1719        for( i = 0; i < trackerCount; ++i ) {
     1720            if( prevTier != trackers[i].tier ) {
    17231721                prevTier = trackers[i].tier;
    17241722                tier = tr_bencListAddList( announceList, 0 );
     
    17311729        if( !tr_metainfoParse( tor->session, &tmpInfo, &metainfo ) )
    17321730        {
    1733             /* if it's good, save it and use it */
    1734             tr_metainfoFree( &tor->info );
    1735             tor->info = tmpInfo;
    1736             tr_torrentInitFilePieces( tor );
     1731            /* it's good, so keep these new trackers and free the old ones */
     1732
     1733            tr_info swap;
     1734            swap.trackers = tor->info.trackers;
     1735            swap.trackerCount = tor->info.trackerCount;
     1736            tor->info.trackers = tmpInfo.trackers;
     1737            tor->info.trackerCount = tmpInfo.trackerCount;
     1738            tmpInfo.trackers = swap.trackers;
     1739            tmpInfo.trackerCount = swap.trackerCount;
     1740
     1741            tr_metainfoFree( &tmpInfo );
    17371742            tr_bencSaveFile( tor->info.torrent, &metainfo );
    17381743        }
Note: See TracChangeset for help on using the changeset viewer.