fixed bug appearing when changing the sequenced download threshold on a torrent which already had some pieced downloaded.

This commit is contained in:
Arvid Norberg
2006-09-01 09:36:43 +00:00
parent bdf1bbc8f4
commit 5ae55c5738
2 changed files with 11 additions and 5 deletions

View File

@@ -157,8 +157,9 @@ namespace libtorrent
if (i->priority(old_limit) != i->priority(m_sequenced_download_threshold))
{
piece_pos& p = *i;
int prev_priority = i->priority(old_limit);
move(p.downloading, p.filtered, prev_priority, i->index);
if (p.index == piece_pos::we_have_index) continue;
int prev_priority = p.priority(old_limit);
move(p.downloading, p.filtered, prev_priority, p.index);
}
}
}
@@ -378,6 +379,7 @@ namespace libtorrent
assert(!filtered);
assert(priority >= 0);
assert(elem_index >= 0);
assert(elem_index != piece_pos::we_have_index);
std::vector<std::vector<int> >& src_vec(pick_piece_info_vector(
downloading, filtered));