From d9388f9898c6d5478bae584bd20b203756b703a9 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Thu, 23 Oct 2014 00:19:11 +0000 Subject: [PATCH] moved around some hostname resolver related TODO comment. removed unused hostname query objects --- include/libtorrent/proxy_base.hpp | 1 + src/resolver.cpp | 3 --- src/torrent.cpp | 3 --- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/include/libtorrent/proxy_base.hpp b/include/libtorrent/proxy_base.hpp index 56f0fbcb7..5f7965f10 100644 --- a/include/libtorrent/proxy_base.hpp +++ b/include/libtorrent/proxy_base.hpp @@ -254,6 +254,7 @@ protected: endpoint_type m_remote_endpoint; + // TODO: 2 use the resolver interface that has a built-in cache tcp::resolver m_resolver; }; diff --git a/src/resolver.cpp b/src/resolver.cpp index 71ff4a9a0..6b1d4a6a0 100644 --- a/src/resolver.cpp +++ b/src/resolver.cpp @@ -36,9 +36,6 @@ POSSIBILITY OF SUCH DAMAGE. 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) : m_ios(ios) , m_resolver(ios) diff --git a/src/torrent.cpp b/src/torrent.cpp index c4bf1e68c..2081a9886 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -3239,7 +3239,6 @@ namespace libtorrent #if defined TORRENT_ASIO_DEBUGGING add_outstanding_async("torrent::on_peer_name_lookup"); #endif - tcp::resolver::query q(i->hostname, to_string(i->port).elems); m_ses.async_resolve(i->hostname, 0 , boost::bind(&torrent::on_peer_name_lookup , shared_from_this(), _1, _2, i->port)); @@ -6011,7 +6010,6 @@ namespace libtorrent #endif web->resolving = true; - tcp::resolver::query q(hostname, to_string(port).elems); m_ses.async_resolve(hostname, 0, boost::bind( &torrent::on_name_lookup, shared_from_this(), _1, _2 , port, web, tcp::endpoint())); @@ -6098,7 +6096,6 @@ namespace libtorrent } web->resolving = true; - tcp::resolver::query q(hostname, to_string(port).elems); m_ses.async_resolve(hostname, 0, boost::bind( &torrent::on_name_lookup, shared_from_this(), _1, _2 , port, web, a));