diff --git a/ChangeLog b/ChangeLog index fa3de0546..807cfc425 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,5 @@ + * fixed problem where peer interested flags were not updated correctly + when pieces were filtered * improvements to ut_pex messages, including support for seed flag * prioritizes upload bandwidth to peers that might send back data * the following functions have been deprecated: diff --git a/src/torrent.cpp b/src/torrent.cpp index 687dce274..b358aa22b 100755 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -1160,9 +1160,8 @@ namespace libtorrent assert(index >= 0); assert(index < m_torrent_file.num_pieces()); - // TODO: update peer's interesting-bit - m_picker->set_piece_priority(index, filter ? 1 : 0); + update_peer_interest(); } void torrent::filter_pieces(std::vector const& bitmask) @@ -1175,8 +1174,6 @@ namespace libtorrent assert(m_picker.get()); - // TODO: update peer's interesting-bit - int index = 0; for (std::vector::const_iterator i = bitmask.begin() , end(bitmask.end()); i != end; ++i, ++index) @@ -1187,6 +1184,7 @@ namespace libtorrent else m_picker->set_piece_priority(index, 1); } + update_peer_interest(); } bool torrent::is_piece_filtered(int index) const