merged lazy bitfields fixes (r1316, r1320)

This commit is contained in:
unsh 2007-06-05 10:20:45 +00:00
parent 22cd8ded91
commit 41cf912501
1 changed files with 7 additions and 7 deletions

View File

@ -825,7 +825,7 @@ namespace libtorrent
for (int c = 0; c < num_pieces; ++c)
{
if (lazy_piece < num_lazy_pieces
&& lazy_pieces[lazy_piece])
&& lazy_pieces[lazy_piece] == c)
{
++lazy_piece;
continue;
@ -834,7 +834,12 @@ namespace libtorrent
i.begin[c >> 3] |= 1 << (7 - (c & 7));
}
assert(i.end - i.begin == (num_pieces + 7) / 8);
#ifndef NDEBUG
m_sent_bitfield = true;
#endif
setup_send();
if (num_lazy_pieces > 0)
{
for (int i = 0; i < num_lazy_pieces; ++i)
@ -846,11 +851,6 @@ namespace libtorrent
#endif
}
}
#ifndef NDEBUG
m_sent_bitfield = true;
#endif
setup_send();
}
#ifndef TORRENT_DISABLE_EXTENSIONS