make torrent::have_piece support magnet links
This commit is contained in:
@@ -500,7 +500,9 @@ namespace libtorrent
|
|||||||
// returns true if we have downloaded the given piece
|
// returns true if we have downloaded the given piece
|
||||||
bool have_piece(int index) const
|
bool have_piece(int index) const
|
||||||
{
|
{
|
||||||
return has_picker()?m_picker->have_piece(index):true;
|
if (!valid_metadata()) return false;
|
||||||
|
if (!has_picker()) return true;
|
||||||
|
return m_picker->have_piece(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
// called when we learn that we have a piece
|
// called when we learn that we have a piece
|
||||||
|
Reference in New Issue
Block a user