fixed set_queue_position() for seeding (or finished) torrents

This commit is contained in:
Arvid Norberg 2008-06-08 13:47:35 +00:00
parent 75eced80f2
commit efcd69b009
1 changed files with 2 additions and 0 deletions

View File

@ -3049,6 +3049,7 @@ namespace libtorrent
{
INVARIANT_CHECK;
TORRENT_ASSERT(!is_finished());
m_state = torrent_status::downloading;
set_queue_position((std::numeric_limits<int>::max)());
}
@ -3385,6 +3386,7 @@ namespace libtorrent
void torrent::set_queue_position(int p)
{
if (is_finished() && p != -1) return;
if (p == m_sequence_number) return;
session_impl::torrent_map& torrents = m_ses.m_torrents;