added a web seed test (requires manual environment setup for web server). fixed bug in torrent_info where file offsets could be left uninitialized. Fixed bug in torrent which would cause a crash in case a torrent without any trackers would be aborted.

This commit is contained in:
Arvid Norberg
2007-02-20 01:42:12 +00:00
parent 4f86042b97
commit 3fc73cb219
5 changed files with 102 additions and 1 deletions

View File

@@ -1072,7 +1072,12 @@ namespace libtorrent { namespace detail
m_torrents.begin(); i != m_torrents.end(); ++i)
{
i->second->abort();
if (!i->second->is_paused() || i->second->should_request())
// generate a tracker request in case the torrent is not paused
// (in which case it's not currently announced with the tracker)
// or if the torrent itself thinks we should request. Do not build
// a request in case the torrent doesn't have any trackers
if ((!i->second->is_paused() || i->second->should_request())
&& !i->second->torrent_file().trackers().empty())
{
tracker_request req = i->second->generate_tracker_request();
req.listen_port = m_listen_interface.port();