|
|
@ -2062,15 +2062,15 @@ namespace libtorrent |
|
|
|
|
|
|
|
|
|
|
|
TORRENT_ASSERT(m_allow_peers); |
|
|
|
TORRENT_ASSERT(m_allow_peers); |
|
|
|
|
|
|
|
|
|
|
|
// [MF] use m_dht->announce with myself=false to update dht tracker with other peers
|
|
|
|
// [MF] use m_dht->announce with myself=false to update dht tracker with peers we know
|
|
|
|
{ |
|
|
|
{ |
|
|
|
policy::const_iterator i = get_policy().begin_peer(); |
|
|
|
policy::const_iterator i = get_policy().begin_peer(); |
|
|
|
policy::const_iterator end = get_policy().end_peer(); |
|
|
|
policy::const_iterator end = get_policy().end_peer(); |
|
|
|
for (; i != end; ++i) |
|
|
|
for (; i != end; ++i) { |
|
|
|
{ |
|
|
|
|
|
|
|
policy::peer const* p = *i; |
|
|
|
policy::peer const* p = *i; |
|
|
|
|
|
|
|
|
|
|
|
if( p->connectable && !p->banned ) { |
|
|
|
if( p->connectable && !p->banned && |
|
|
|
|
|
|
|
int(p->failcount) < settings().max_failcount ) { |
|
|
|
m_ses.m_dht->announce(name(), m_torrent_file->info_hash() |
|
|
|
m_ses.m_dht->announce(name(), m_torrent_file->info_hash() |
|
|
|
, p->address(), p->port, p->seed, false |
|
|
|
, p->address(), p->port, p->seed, false |
|
|
|
, boost::bind(&nop)); |
|
|
|
, boost::bind(&nop)); |
|
|
|