piece picker updates

This commit is contained in:
Arvid Norberg 2007-09-06 18:30:46 +00:00
parent fb401d2499
commit 0d6970168d
3 changed files with 4 additions and 5 deletions

View File

@ -223,7 +223,7 @@ namespace libtorrent
{
block_downloading_alert(
const torrent_handle& h
, std::string& speedmsg
, char const* speedmsg
, int block_num
, int piece_num
, const std::string& msg)

View File

@ -207,7 +207,6 @@ namespace libtorrent
int add_blocks(std::vector<int> const& piece_list
, const std::vector<bool>& pieces
, std::vector<piece_block>& interesting_blocks
, std::vector<piece_block>& backup_blocks
, int num_blocks, int prefer_whole_pieces
, void* peer, std::vector<int> const& ignore) const;

View File

@ -1149,13 +1149,13 @@ namespace libtorrent
if (!suggested_bucket.empty())
{
num_blocks = add_blocks(suggested_bucket, pieces
, interesting_blocks, backup_blocks, num_blocks
, interesting_blocks, num_blocks
, prefer_whole_pieces, peer, empty_vector);
if (num_blocks == 0) break;
}
}
num_blocks = add_blocks(*bucket, pieces
, interesting_blocks, backup_blocks, num_blocks
, interesting_blocks, num_blocks
, prefer_whole_pieces, peer, suggested_bucket);
assert(num_blocks >= 0);
}
@ -1263,7 +1263,6 @@ namespace libtorrent
int piece_picker::add_blocks(std::vector<int> const& piece_list
, std::vector<bool> const& pieces
, std::vector<piece_block>& interesting_blocks
, std::vector<piece_block>& backup_blocks
, int num_blocks, int prefer_whole_pieces
, void* peer, std::vector<int> const& ignore) const
{
@ -1381,6 +1380,7 @@ namespace libtorrent
assert(num_blocks >= 0 || prefer_whole_pieces > 0);
if (num_blocks <= 0) return 0;
if (on_parole) return num_blocks;
interesting_blocks.insert(interesting_blocks.end()
, backup_blocks.begin(), backup_blocks.end());