From c695729bbe22835aeb8f58b4a71b2e0332aa52e4 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Mon, 25 May 2009 20:31:20 +0000 Subject: [PATCH] fixed bug when force-checking a torrent with partial pieces --- ChangeLog | 1 + src/piece_picker.cpp | 3 +++ src/torrent.cpp | 7 ------- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 536988313..ee94c1075 100644 --- a/ChangeLog +++ b/ChangeLog @@ -68,6 +68,7 @@ release 0.14.4 * optimized memory usage when checking files fails * fixed bug when checking a torrent twice * improved handling of out-of-memory conditions in disk I/O thread + * fixed bug when force-checking a torrent with partial pieces release 0.14.3 diff --git a/src/piece_picker.cpp b/src/piece_picker.cpp index 6ef403198..1fb4891d0 100644 --- a/src/piece_picker.cpp +++ b/src/piece_picker.cpp @@ -91,6 +91,9 @@ namespace libtorrent m_reverse_cursor = int(m_piece_map.size()); m_cursor = 0; + m_downloads.clear(); + m_block_info.clear(); + m_num_filtered += m_num_have_filtered; m_num_have_filtered = 0; m_num_have = 0; diff --git a/src/torrent.cpp b/src/torrent.cpp index ea583e3dc..4a3fabd76 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -840,13 +840,6 @@ namespace libtorrent || m_state == torrent_status::checking_resume_data) return; - if ((is_paused() && !m_auto_managed)) - { - // set the queued for checking state, so that it's - // checked as soon as it's resumed or made auto managed - set_state(torrent_status::queued_for_checking); - return; - } clear_error(); disconnect_all();