forked from premiere/premiere-libtorrent
added 'incoming' peer source
This commit is contained in:
parent
bdd14cc155
commit
73bb0c05ad
|
@ -72,7 +72,8 @@ namespace libtorrent
|
|||
dht = 0x2,
|
||||
pex = 0x4,
|
||||
lsd = 0x8,
|
||||
resume_data = 0x10
|
||||
resume_data = 0x10,
|
||||
incoming = 0x20
|
||||
};
|
||||
|
||||
int source;
|
||||
|
|
|
@ -1221,7 +1221,7 @@ namespace libtorrent
|
|||
{
|
||||
tcp::endpoint adr(remote().address()
|
||||
, (unsigned short)listen_port->integer());
|
||||
t->get_policy().peer_from_tracker(adr, pid(), 0, 0);
|
||||
t->get_policy().peer_from_tracker(adr, pid(), peer_info::incoming, 0);
|
||||
}
|
||||
}
|
||||
// there should be a version too
|
||||
|
|
|
@ -1229,6 +1229,7 @@ namespace libtorrent
|
|||
|
||||
bool piece_picker::can_pick(int piece, std::vector<bool> const& bitmask) const
|
||||
{
|
||||
assert(piece >= 0 && piece < int(m_piece_map.size()));
|
||||
return bitmask[piece]
|
||||
&& !m_piece_map[piece].have()
|
||||
&& !m_piece_map[piece].downloading
|
||||
|
|
Loading…
Reference in New Issue