Changeset 9860 for trunk/libtransmission/torrent.c
- Timestamp:
- Jan 4, 2010, 9:11:27 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/torrent.c
r9859 r9860 2090 2090 int i; 2091 2091 tr_benc metainfo; 2092 tr_bool ok = TRUE; 2093 tr_torrentLock( tor ); 2092 2094 2093 2095 assert( tr_isTorrent( tor ) ); 2094 2096 2095 2097 /* look for bad URLs */ 2096 for( i=0; i<trackerCount; ++i )2098 for( i=0; ok && i<trackerCount; ++i ) 2097 2099 if( !tr_httpIsValidURL( trackers[i].announce ) ) 2098 return TR_ANNOUNCE_LIST_HAS_BAD;2100 ok = FALSE; 2099 2101 2100 2102 /* save to the .torrent file */ 2101 if( !tr_bencLoadFile( &metainfo, TR_FMT_BENC, tor->info.torrent ) )2103 if( ok && !tr_bencLoadFile( &metainfo, TR_FMT_BENC, tor->info.torrent ) ) 2102 2104 { 2103 2105 tr_info tmpInfo; … … 2156 2158 } 2157 2159 2158 return TR_ANNOUNCE_LIST_OK; 2160 tr_torrentUnlock( tor ); 2161 return ok ? TR_ANNOUNCE_LIST_OK : TR_ANNOUNCE_LIST_HAS_BAD; 2159 2162 } 2160 2163
Note: See TracChangeset
for help on using the changeset viewer.