Merge pull request #394 from arvidn/forward-port-http-fix
forward port fix for web seeds not being used by torrents added by URL
This commit is contained in:
commit
fa391d4961
|
@ -80,6 +80,7 @@
|
||||||
* almost completely changed the storage interface (for custom storage)
|
* almost completely changed the storage interface (for custom storage)
|
||||||
* added support for hashing pieces in multiple threads
|
* added support for hashing pieces in multiple threads
|
||||||
|
|
||||||
|
* fix bug where web seeds were not used for torrents added by URL
|
||||||
* fix support for symlinks on windows
|
* fix support for symlinks on windows
|
||||||
* fix long filename issue (on unixes)
|
* fix long filename issue (on unixes)
|
||||||
* fixed performance bug in DHT torrent eviction
|
* fixed performance bug in DHT torrent eviction
|
||||||
|
|
|
@ -479,7 +479,7 @@ namespace libtorrent
|
||||||
TORRENT_ASSERT(num_torrents == int(m_ses.m_torrents.size()));
|
TORRENT_ASSERT(num_torrents == int(m_ses.m_torrents.size()));
|
||||||
|
|
||||||
// if the user added any trackers while downloading the
|
// if the user added any trackers while downloading the
|
||||||
// .torrent file, serge them into the new tracker list
|
// .torrent file, merge them into the new tracker list
|
||||||
std::vector<announce_entry> new_trackers = m_torrent_file->trackers();
|
std::vector<announce_entry> new_trackers = m_torrent_file->trackers();
|
||||||
for (std::vector<announce_entry>::iterator i = m_trackers.begin()
|
for (std::vector<announce_entry>::iterator i = m_trackers.begin()
|
||||||
, end(m_trackers.end()); i != end; ++i)
|
, end(m_trackers.end()); i != end; ++i)
|
||||||
|
@ -605,6 +605,10 @@ namespace libtorrent
|
||||||
}
|
}
|
||||||
m_trackers.swap(new_trackers);
|
m_trackers.swap(new_trackers);
|
||||||
|
|
||||||
|
// add the web seeds from the .torrent file
|
||||||
|
std::vector<web_seed_entry> const& web_seeds = m_torrent_file->web_seeds();
|
||||||
|
m_web_seeds.insert(m_web_seeds.end(), web_seeds.begin(), web_seeds.end());
|
||||||
|
|
||||||
#if !defined(TORRENT_DISABLE_ENCRYPTION) && !defined(TORRENT_DISABLE_EXTENSIONS)
|
#if !defined(TORRENT_DISABLE_ENCRYPTION) && !defined(TORRENT_DISABLE_EXTENSIONS)
|
||||||
hasher h;
|
hasher h;
|
||||||
h.update("req2", 4);
|
h.update("req2", 4);
|
||||||
|
|
Loading…
Reference in New Issue