mirror of
https://github.com/transmission/transmission
synced 2024-12-27 01:57:52 +00:00
(trunk libT) remove the test for duplicate trackers in the announce list.
This commit is contained in:
parent
196a7ccbb9
commit
20a4560198
2 changed files with 1 additions and 8 deletions
|
@ -2084,7 +2084,7 @@ tr_torrentSetAnnounceList( tr_torrent * tor,
|
||||||
const tr_tracker_info * trackers,
|
const tr_tracker_info * trackers,
|
||||||
int trackerCount )
|
int trackerCount )
|
||||||
{
|
{
|
||||||
int i, j;
|
int i;
|
||||||
tr_benc metainfo;
|
tr_benc metainfo;
|
||||||
|
|
||||||
assert( tr_isTorrent( tor ) );
|
assert( tr_isTorrent( tor ) );
|
||||||
|
@ -2094,12 +2094,6 @@ tr_torrentSetAnnounceList( tr_torrent * tor,
|
||||||
if( !tr_httpIsValidURL( trackers[i].announce ) )
|
if( !tr_httpIsValidURL( trackers[i].announce ) )
|
||||||
return TR_ANNOUNCE_LIST_HAS_BAD;
|
return TR_ANNOUNCE_LIST_HAS_BAD;
|
||||||
|
|
||||||
/* look for duplicates */
|
|
||||||
for( i=0; i<trackerCount; ++i )
|
|
||||||
for( j=0; j<trackerCount; ++j )
|
|
||||||
if( ( i != j ) && ( !strcmp( trackers[i].announce, trackers[j].announce ) ) )
|
|
||||||
return TR_ANNOUNCE_LIST_HAS_DUPLICATES;
|
|
||||||
|
|
||||||
/* save to the .torrent file */
|
/* save to the .torrent file */
|
||||||
if( !tr_bencLoadFile( &metainfo, TR_FMT_BENC, tor->info.torrent ) )
|
if( !tr_bencLoadFile( &metainfo, TR_FMT_BENC, tor->info.torrent ) )
|
||||||
{
|
{
|
||||||
|
|
|
@ -1202,7 +1202,6 @@ tr_tracker_info;
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
TR_ANNOUNCE_LIST_OK,
|
TR_ANNOUNCE_LIST_OK,
|
||||||
TR_ANNOUNCE_LIST_HAS_DUPLICATES,
|
|
||||||
TR_ANNOUNCE_LIST_HAS_BAD
|
TR_ANNOUNCE_LIST_HAS_BAD
|
||||||
}
|
}
|
||||||
tr_announce_list_err;
|
tr_announce_list_err;
|
||||||
|
|
Loading…
Reference in a new issue