1 --- libtorrent-rasterbar-1.1.11/include/libtorrent/io_service_fwd.hpp.orig 2018-11-18 13:55:50.000000000 +0100
2 +++ libtorrent-rasterbar-1.1.11/include/libtorrent/io_service_fwd.hpp 2019-04-28 16:31:24.497229017 +0200
5 typedef boost::asio::io_service io_service;
8 +#if BOOST_VERSION >= 107000
10 +io_service& get_io_service(T& o) { return static_cast<io_service&>(o.get_executor().context()); }
12 +template <typename T>
13 +io_service& get_io_service(T& o) { return o.get_io_service(); }
19 --- libtorrent-rasterbar-1.2.0/include/libtorrent/io_service.hpp.orig 2019-04-28 21:20:37.963217224 +0200
20 +++ libtorrent-rasterbar-1.2.0/include/libtorrent/io_service.hpp 2019-04-28 22:13:25.612723260 +0200
22 #include "libtorrent/aux_/disable_warnings_pop.hpp"
25 -namespace libtorrent {
27 -#if defined TORRENT_BUILD_SIMULATOR
28 - using io_service = sim::asio::io_service;
30 - using io_service = boost::asio::io_service;
33 +#include "libtorrent/io_service_fwd.hpp"
36 --- libtorrent-rasterbar-1.0.11/include/libtorrent/tracker_manager.hpp.orig 2017-02-04 19:16:33.000000000 +0100
37 +++ libtorrent-rasterbar-1.0.11/include/libtorrent/tracker_manager.hpp 2019-04-27 18:54:42.557868860 +0200
39 virtual void on_timeout(error_code const& ec) = 0;
40 virtual ~timeout_handler() {}
42 - io_service& get_io_service() { return m_timeout.get_io_service(); }
43 + io_service& get_io_service() { return libtorrent::get_io_service(m_timeout); }
47 --- libtorrent-rasterbar-1.1.11/include/libtorrent/proxy_base.hpp.orig 2017-02-04 19:16:33.000000000 +0100
48 +++ libtorrent-rasterbar-1.1.11/include/libtorrent/proxy_base.hpp 2019-04-27 21:18:33.689487409 +0200
51 io_service& get_io_service()
53 - return m_sock.get_io_service();
54 + return libtorrent::get_io_service(m_sock);
57 lowest_layer_type& lowest_layer()
58 --- libtorrent-rasterbar-1.2.0/include/libtorrent/udp_socket.hpp.orig 2019-04-28 22:13:51.845914476 +0200
59 +++ libtorrent-rasterbar-1.2.0/include/libtorrent/udp_socket.hpp 2019-04-28 22:15:48.195284157 +0200
61 static constexpr udp_send_flags_t dont_fragment = 3_bit;
63 bool is_open() const { return m_abort == false; }
64 - io_service& get_io_service() { return m_socket.get_io_service(); }
65 + io_service& get_io_service() { return libtorrent::get_io_service(m_socket); }
67 template <typename Handler>
68 void async_read(Handler&& h)
69 --- libtorrent-rasterbar-1.2.0/src/http_connection.cpp.orig 2019-04-28 22:16:06.475185127 +0200
70 +++ libtorrent-rasterbar-1.2.0/src/http_connection.cpp 2019-04-29 05:45:33.065761241 +0200
75 - m_timer.get_io_service().post(std::bind(&http_connection::callback
76 + libtorrent::get_io_service(m_timer).post(std::bind(&http_connection::callback
77 , me, ec, span<char>{}));
83 error_code err(errors::unsupported_url_protocol);
84 - m_timer.get_io_service().post(std::bind(&http_connection::callback
85 + libtorrent::get_io_service(m_timer).post(std::bind(&http_connection::callback
86 , me, err, span<char>{}));
93 - m_timer.get_io_service().post(std::bind(&http_connection::callback
94 + libtorrent::get_io_service(m_timer).post(std::bind(&http_connection::callback
95 , me, ec, span<char>{}));
100 if (i2p_conn->proxy().type != settings_pack::i2p_proxy)
102 - m_timer.get_io_service().post(std::bind(&http_connection::callback
103 + libtorrent::get_io_service(m_timer).post(std::bind(&http_connection::callback
104 , me, error_code(errors::no_i2p_router), span<char>{}));
108 m_ssl_ctx->set_verify_mode(ssl::context::verify_none, ec);
111 - m_timer.get_io_service().post(std::bind(&http_connection::callback
112 + libtorrent::get_io_service(m_timer).post(std::bind(&http_connection::callback
113 , me, ec, span<char>{}));
117 // assume this is not a tracker connection. Tracker connections that
118 // shouldn't be subject to the proxy should pass in nullptr as the proxy
120 - instantiate_connection(m_timer.get_io_service()
121 + instantiate_connection(libtorrent::get_io_service(m_timer)
122 , proxy ? *proxy : null_proxy, m_sock, userdata, nullptr, false, false);
126 m_sock.bind(tcp::endpoint(*m_bind_addr, 0), ec);
129 - m_timer.get_io_service().post(std::bind(&http_connection::callback
130 + libtorrent::get_io_service(m_timer).post(std::bind(&http_connection::callback
131 , me, ec, span<char>{}));
135 setup_ssl_hostname(m_sock, hostname, ec);
138 - m_timer.get_io_service().post(std::bind(&http_connection::callback
139 + libtorrent::get_io_service(m_timer).post(std::bind(&http_connection::callback
140 , me, ec, span<char>{}));
143 --- libtorrent-rasterbar-1.2.0/src/natpmp.cpp.orig 2019-04-29 05:46:02.395602348 +0200
144 +++ libtorrent-rasterbar-1.2.0/src/natpmp.cpp 2019-04-29 05:47:21.881838401 +0200
145 @@ -160,13 +160,13 @@
146 // try to find one even if the listen socket isn't bound to a device
149 - device = device_for_address(local_address, m_socket.get_io_service(), ec);
150 + device = device_for_address(local_address, libtorrent::get_io_service(m_socket), ec);
151 // if this fails fall back to using the first default gateway in the
156 - auto const route = get_default_route(m_socket.get_io_service()
157 + auto const route = get_default_route(libtorrent::get_io_service(m_socket)
158 , device, local_address.is_v6(), ec);
162 if (local_address.is_unspecified())
164 std::vector<ip_interface> const net = enum_net_interfaces(
165 - m_socket.get_io_service(), ec);
166 + libtorrent::get_io_service(m_socket), ec);
168 auto const it = std::find_if(net.begin(), net.end(), [&](ip_interface const& i)
170 --- libtorrent-rasterbar-1.2.0/src/lsd.cpp.orig 2019-04-29 05:46:02.395602348 +0200
171 +++ libtorrent-rasterbar-1.2.0/src/lsd.cpp 2019-04-29 05:48:04.508274140 +0200
172 @@ -100,11 +100,11 @@
173 void lsd::start(error_code& ec)
175 m_socket.open(std::bind(&lsd::on_announce, self(), _1, _2)
176 - , m_broadcast_timer.get_io_service(), ec);
177 + , libtorrent::get_io_service(m_broadcast_timer), ec);
180 m_socket6.open(std::bind(&lsd::on_announce, self(), _1, _2)
181 - , m_broadcast_timer.get_io_service(), ec);
182 + , libtorrent::get_io_service(m_broadcast_timer), ec);
185 lsd::~lsd() = default;
186 --- libtorrent-rasterbar-1.2.0/src/upnp.cpp.orig 2019-04-29 05:46:02.395602348 +0200
187 +++ libtorrent-rasterbar-1.2.0/src/upnp.cpp 2019-04-29 05:48:43.981393629 +0200
191 m_socket.open(std::bind(&upnp::on_reply, self(), _1, _2)
192 - , m_refresh_timer.get_io_service(), ec);
193 + , libtorrent::get_io_service(m_refresh_timer), ec);
195 m_mappings.reserve(10);
197 --- libtorrent-rasterbar-1.2.0/src/disk_io_thread_pool.cpp.orig 2019-01-12 16:01:06.000000000 +0100
198 +++ libtorrent-rasterbar-1.2.0/src/disk_io_thread_pool.cpp 2019-04-29 17:25:13.851665143 +0200
200 // buffer pool won't exist anymore, and crash. This prevents that.
201 m_threads.emplace_back(&pool_thread_interface::thread_fun
202 , &m_thread_iface, std::ref(*this)
203 - , io_service::work(m_idle_timer.get_io_service()));
204 + , io_service::work(libtorrent::get_io_service(m_idle_timer)));
208 --- libtorrent-rasterbar-1.2.0/src/udp_socket.cpp.orig 2019-01-12 16:01:06.000000000 +0100
209 +++ libtorrent-rasterbar-1.2.0/src/udp_socket.cpp 2019-04-29 18:22:44.892969248 +0200
212 // connect to socks5 server and open up the UDP tunnel
214 - m_socks5_connection = std::make_shared<socks5>(m_socket.get_io_service());
215 + m_socks5_connection = std::make_shared<socks5>(libtorrent::get_io_service(m_socket));
216 m_socks5_connection->start(ps);
219 --- libtorrent-rasterbar-1.2.0/src/kademlia/dht_tracker.cpp.orig 2019-01-12 16:01:06.000000000 +0100
220 +++ libtorrent-rasterbar-1.2.0/src/kademlia/dht_tracker.cpp 2019-04-29 19:30:02.651094835 +0200
222 // must use piecewise construction because tracker_node::connection_timer
223 // is neither copyable nor movable
224 auto n = m_nodes.emplace(std::piecewise_construct_t(), std::forward_as_tuple(s)
225 - , std::forward_as_tuple(m_key_refresh_timer.get_io_service()
226 + , std::forward_as_tuple(libtorrent::get_io_service(m_key_refresh_timer)
227 , s, this, m_settings, nid, m_log, m_counters
228 , std::bind(&dht_tracker::get_node, this, _1, _2)