Changeset 7242
- Timestamp:
- Dec 2, 2008, 11:27:45 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/torrent.c
r7238 r7242 1720 1720 tr_bencDictAddStr( &metainfo, "announce", trackers[0].announce ); 1721 1721 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 ) { 1726 1724 prevTier = trackers[i].tier; 1727 1725 tier = tr_bencListAddList( announceList, 0 ); … … 1734 1732 if( !tr_metainfoParse( tor->session, &tmpInfo, &metainfo ) ) 1735 1733 { 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 ); 1740 1745 tr_bencSaveFile( tor->info.torrent, &metainfo ); 1741 1746 }
Note: See TracChangeset
for help on using the changeset viewer.