From 3c47177bfea86ceda8f9713aa6f7c9c555a11957 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Fri, 7 Mar 2014 19:19:17 +0000 Subject: [PATCH] merged changes from RC_0_16 --- ChangeLog | 1 + src/torrent.cpp | 14 +++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0e2becbee..4a938c211 100644 --- a/ChangeLog +++ b/ChangeLog @@ -41,6 +41,7 @@ * fix uTP edge case where udp socket buffer fills up * fix nagle implementation in uTP + * fix debug logging for banning web seeds * improve support for de-selected files in full allocation mode * fix dht_bootstrap_alert being posted * SetFileValidData fix on windows (prevents zero-fill) diff --git a/src/torrent.cpp b/src/torrent.cpp index 866719db0..05c67fca9 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -4610,6 +4610,10 @@ namespace libtorrent if (ps.type == proxy_settings::http || ps.type == proxy_settings::http_pw) { +#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING + debug_log("resolving proxy for web seed: %s", web->url.c_str()); +#endif + // use proxy web->resolving = true; tcp::resolver::query q(ps.hostname, to_string(ps.port).elems); @@ -4624,6 +4628,10 @@ namespace libtorrent } else { +#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING + debug_log("resolving web seed: %s", web->url.c_str()); +#endif + web->resolving = true; tcp::resolver::query q(hostname, to_string(port).elems); m_host_resolver.async_resolve(q, @@ -4762,11 +4770,15 @@ namespace libtorrent return; } + tcp::endpoint a(host->endpoint()); + + // fill in the peer struct's address field + web->endpoint = a; + if (int(m_connections.size()) >= m_max_connections || m_ses.num_connections() >= m_ses.settings().connections_limit) return; - tcp::endpoint a(host->endpoint()); connect_web_seed(web, a); }