(trunk libT) #2489: stricter checking of fringe cases in tr_torrentSetAnnounceList()

This commit is contained in:
Charles Kerr 2009-10-10 19:39:43 +00:00
parent e66f8d06d2
commit fe2d851e5b
1 changed files with 2 additions and 4 deletions

View File

@ -2029,10 +2029,8 @@ tr_torrentSetAnnounceList( tr_torrent * tor,
/* look for duplicates */
for( i=0; i<trackerCount; ++i )
for( j=0; j<trackerCount; ++j )
if( ( i != j )
&& ( trackers[i].tier == trackers[j].tier)
&& ( !strcmp( trackers[i].announce, trackers[j].announce ) ) )
return TR_ANNOUNCE_LIST_HAS_DUPLICATES;
if( ( i != j ) && ( !strcmp( trackers[i].announce, trackers[j].announce ) ) )
return TR_ANNOUNCE_LIST_HAS_DUPLICATES;
/* save to the .torrent file */
if( !tr_bencLoadFile( &metainfo, TR_FMT_BENC, tor->info.torrent ) )