Changeset 7243
- Timestamp:
- Dec 2, 2008, 11:29:46 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.4x/libtransmission/torrent.c
r7176 r7243 1717 1717 tr_bencDictAddStr( &metainfo, "announce", trackers[0].announce ); 1718 1718 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 ) { 1723 1721 prevTier = trackers[i].tier; 1724 1722 tier = tr_bencListAddList( announceList, 0 ); … … 1731 1729 if( !tr_metainfoParse( tor->session, &tmpInfo, &metainfo ) ) 1732 1730 { 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 ); 1737 1742 tr_bencSaveFile( tor->info.torrent, &metainfo ); 1738 1743 }
Note: See TracChangeset
for help on using the changeset viewer.