diff --git a/src/policy.cpp b/src/policy.cpp index e6746cd00..a85e26582 100755 --- a/src/policy.cpp +++ b/src/policy.cpp @@ -998,6 +998,15 @@ namespace libtorrent // because of the push_back() i = boost::prior(m_peers.end()); if (flags & 0x02) p.seed = true; + + // try to send a DHT ping to this peer + // as well, to figure out if it supports + // DHT (uTorrent and BitComet doesn't + // advertise support) +#ifndef TORRENT_DISABLE_DHT + udp::endpoint node(remote.address(), remote.port()); + m_torrent->session().add_dht_node(node); +#endif } else { diff --git a/src/session_impl.cpp b/src/session_impl.cpp index 7094fe34c..6c3e300c2 100755 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -560,7 +560,7 @@ namespace libtorrent { namespace detail } #endif -#ifndef TORRENT_DISABLE_DHT +#ifndef TORRENT_DISABLE_DHT void session_impl::add_dht_node(udp::endpoint n) { if (m_dht) m_dht->add_node(n);