*** empty log message ***

This commit is contained in:
Arvid Norberg
2003-10-29 23:28:09 +00:00
parent 1bd0a8234a
commit d7f92afea3
19 changed files with 624 additions and 271 deletions

View File

@@ -452,8 +452,7 @@ namespace libtorrent
= std::find_if(m_downloads.begin(), m_downloads.end(), has_index(index));
assert(i != m_downloads.end());
assert(i->finished_blocks.count() <= m_blocks_per_piece);
int max_blocks = m_blocks_per_piece;
if (index+1 == m_piece_map.size()) max_blocks = m_blocks_in_last_piece;
int max_blocks = blocks_in_piece(index);
if (i->finished_blocks.count() != max_blocks) return false;
assert(i->requested_blocks.count() == max_blocks);
@@ -561,4 +560,16 @@ namespace libtorrent
#endif
}
int piece_picker::unverified_blocks() const
{
int counter = 0;
for (std::vector<downloading_piece>::const_iterator i = m_downloads.begin();
i != m_downloads.end();
++i)
{
counter += i->finished_blocks.count();
}
return counter;
}
}