diff --git a/include/libtorrent/tracker_manager.hpp b/include/libtorrent/tracker_manager.hpp index 9f6f41775..1de5b4f7b 100644 --- a/include/libtorrent/tracker_manager.hpp +++ b/include/libtorrent/tracker_manager.hpp @@ -369,7 +369,7 @@ namespace libtorrent , boost::uint64_t tid); aux::session_settings const& settings() const { return m_settings; } - class udp_socket& udp_socket() { return m_udp_socket; } + udp_socket& get_udp_socket() { return m_udp_socket; } struct ip_filter const& ip_filter() const { return m_ip_filter; } resolver_interface& host_resolver() { return m_host_resolver; } diff --git a/src/udp_tracker_connection.cpp b/src/udp_tracker_connection.cpp index b0cef064b..9b68fd8ba 100644 --- a/src/udp_tracker_connection.cpp +++ b/src/udp_tracker_connection.cpp @@ -506,12 +506,12 @@ namespace libtorrent error_code ec; if (!m_hostname.empty()) { - m_man.udp_socket().send_hostname(m_hostname.c_str() + m_man.get_udp_socket().send_hostname(m_hostname.c_str() , m_target.port(), buf, 16, ec); } else { - m_man.udp_socket().send(m_target, buf, 16, ec); + m_man.get_udp_socket().send(m_target, buf, 16, ec); } @@ -569,11 +569,11 @@ namespace libtorrent error_code ec; if (!m_hostname.empty()) { - m_man.udp_socket().send_hostname(m_hostname.c_str(), m_target.port(), buf, sizeof(buf), ec); + m_man.get_udp_socket().send_hostname(m_hostname.c_str(), m_target.port(), buf, sizeof(buf), ec); } else { - m_man.udp_socket().send(m_target, buf, sizeof(buf), ec); + m_man.get_udp_socket().send(m_target, buf, sizeof(buf), ec); } m_state = action_scrape; sent_bytes(sizeof(buf) + 28); // assuming UDP/IP header @@ -767,12 +767,12 @@ namespace libtorrent if (!m_hostname.empty()) { - m_man.udp_socket().send_hostname(m_hostname.c_str() + m_man.get_udp_socket().send_hostname(m_hostname.c_str() , m_target.port(), buf, out - buf, ec); } else { - m_man.udp_socket().send(m_target, buf, out - buf, ec); + m_man.get_udp_socket().send(m_target, buf, out - buf, ec); } m_state = action_announce; sent_bytes(out - buf + 28); // assuming UDP/IP header