made get_download_queue() use considerably less memory and scale with larger piece_sizes

This commit is contained in:
Arvid Norberg
2009-05-03 09:45:07 +00:00
parent 7563ba87b5
commit d73c97e444
6 changed files with 69 additions and 14 deletions

View File

@@ -1360,7 +1360,7 @@ int main(int argc, char* argv[])
out << to_string(i->piece_index, 4) << ": [";
for (int j = 0; j < i->blocks_in_piece; ++j)
{
int index = peer_index(i->blocks[j].peer, peers);
int index = peer_index(i->blocks[j].peer(), peers);
char str[] = "+";
if (index >= 0)
str[0] = (index < 10)?'0' + index:'A' + index - 10;