moved around some hostname resolver related TODO comment. removed unused hostname query objects

This commit is contained in:
Arvid Norberg 2014-10-23 00:19:11 +00:00
parent e09a2b770d
commit d9388f9898
3 changed files with 1 additions and 6 deletions

View File

@ -254,6 +254,7 @@ protected:
endpoint_type m_remote_endpoint; endpoint_type m_remote_endpoint;
// TODO: 2 use the resolver interface that has a built-in cache
tcp::resolver m_resolver; tcp::resolver m_resolver;
}; };

View File

@ -36,9 +36,6 @@ POSSIBILITY OF SUCH DAMAGE.
namespace libtorrent namespace libtorrent
{ {
// TODO: 3 the first places to use this resolver is the
// http_connection/http_tracker_connection and udp_tracker_connection.
// make sure to prefer cache on shutdown
resolver::resolver(io_service& ios) resolver::resolver(io_service& ios)
: m_ios(ios) : m_ios(ios)
, m_resolver(ios) , m_resolver(ios)

View File

@ -3239,7 +3239,6 @@ namespace libtorrent
#if defined TORRENT_ASIO_DEBUGGING #if defined TORRENT_ASIO_DEBUGGING
add_outstanding_async("torrent::on_peer_name_lookup"); add_outstanding_async("torrent::on_peer_name_lookup");
#endif #endif
tcp::resolver::query q(i->hostname, to_string(i->port).elems);
m_ses.async_resolve(i->hostname, 0 m_ses.async_resolve(i->hostname, 0
, boost::bind(&torrent::on_peer_name_lookup , boost::bind(&torrent::on_peer_name_lookup
, shared_from_this(), _1, _2, i->port)); , shared_from_this(), _1, _2, i->port));
@ -6011,7 +6010,6 @@ namespace libtorrent
#endif #endif
web->resolving = true; web->resolving = true;
tcp::resolver::query q(hostname, to_string(port).elems);
m_ses.async_resolve(hostname, 0, boost::bind( m_ses.async_resolve(hostname, 0, boost::bind(
&torrent::on_name_lookup, shared_from_this(), _1, _2 &torrent::on_name_lookup, shared_from_this(), _1, _2
, port, web, tcp::endpoint())); , port, web, tcp::endpoint()));
@ -6098,7 +6096,6 @@ namespace libtorrent
} }
web->resolving = true; web->resolving = true;
tcp::resolver::query q(hostname, to_string(port).elems);
m_ses.async_resolve(hostname, 0, boost::bind( m_ses.async_resolve(hostname, 0, boost::bind(
&torrent::on_name_lookup, shared_from_this(), _1, _2 &torrent::on_name_lookup, shared_from_this(), _1, _2
, port, web, a)); , port, web, a));