fixed a bug when checking a torrent twice

This commit is contained in:
Arvid Norberg 2009-05-23 15:58:32 +00:00
parent f9c12ef589
commit 5fbff8e060
3 changed files with 5 additions and 0 deletions

View File

@ -65,6 +65,7 @@ release 0.14.4
* lowered the default connection speed to 10 connection attempts * lowered the default connection speed to 10 connection attempts
per second per second
* optimized memory usage when checking files fails * optimized memory usage when checking files fails
* fixed bug when checking a torrent twice
release 0.14.3 release 0.14.3

View File

@ -2031,6 +2031,8 @@ ret:
TORRENT_ASSERT(m_files.piece_length() > 0); TORRENT_ASSERT(m_files.piece_length() > 0);
m_current_slot = 0;
// if we don't have any resume data, return // if we don't have any resume data, return
if (rd.type() == lazy_entry::none_t) return check_no_fastresume(error); if (rd.type() == lazy_entry::none_t) return check_no_fastresume(error);

View File

@ -859,6 +859,8 @@ namespace libtorrent
m_files_checked = false; m_files_checked = false;
set_state(torrent_status::checking_resume_data); set_state(torrent_status::checking_resume_data);
m_policy.recalculate_connect_candidates();
if (m_auto_managed) if (m_auto_managed)
set_queue_position((std::numeric_limits<int>::max)()); set_queue_position((std::numeric_limits<int>::max)());