]>
Commit | Line | Data |
---|---|---|
8c4aad5f JB |
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 | |
3 | @@ -69,6 +69,15 @@ | |
4 | #else | |
b47425e4 | 5 | typedef boost::asio::io_service io_service; |
b47425e4 JB |
6 | #endif |
7 | + | |
8 | +#if BOOST_VERSION >= 107000 | |
9 | +template <typename T> | |
10 | +io_service& get_io_service(T& o) { return static_cast<io_service&>(o.get_executor().context()); } | |
11 | +#else | |
12 | +template <typename T> | |
13 | +io_service& get_io_service(T& o) { return o.get_io_service(); } | |
14 | +#endif | |
15 | + | |
16 | } | |
17 | ||
18 | #endif | |
3eab5e87 JB |
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 | |
21 | @@ -41,13 +41,6 @@ | |
22 | #include "libtorrent/aux_/disable_warnings_pop.hpp" | |
23 | #endif // SIMULATOR | |
24 | ||
25 | -namespace libtorrent { | |
26 | - | |
8c4aad5f | 27 | -#if defined TORRENT_BUILD_SIMULATOR |
3eab5e87 | 28 | - using io_service = sim::asio::io_service; |
b47425e4 | 29 | -#else |
3eab5e87 | 30 | - using io_service = boost::asio::io_service; |
b47425e4 JB |
31 | -#endif |
32 | -} | |
33 | +#include "libtorrent/io_service_fwd.hpp" | |
34 | ||
35 | #endif | |
b47425e4 JB |
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 | |
38 | @@ -191,7 +191,7 @@ | |
39 | virtual void on_timeout(error_code const& ec) = 0; | |
40 | virtual ~timeout_handler() {} | |
41 | ||
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); } | |
44 | ||
45 | private: | |
46 | ||
8c4aad5f JB |
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 | |
49 | @@ -250,7 +250,7 @@ | |
b47425e4 JB |
50 | |
51 | io_service& get_io_service() | |
52 | { | |
53 | - return m_sock.get_io_service(); | |
54 | + return libtorrent::get_io_service(m_sock); | |
55 | } | |
56 | ||
57 | lowest_layer_type& lowest_layer() | |
3eab5e87 JB |
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 | |
60 | @@ -61,7 +61,7 @@ | |
61 | static constexpr udp_send_flags_t dont_fragment = 3_bit; | |
8c4aad5f JB |
62 | |
63 | bool is_open() const { return m_abort == false; } | |
3eab5e87 JB |
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); } | |
b47425e4 | 66 | |
3eab5e87 JB |
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 | |
71 | @@ -148,7 +148,7 @@ | |
b47425e4 | 72 | |
8c4aad5f | 73 | if (ec) |
b47425e4 | 74 | { |
3eab5e87 JB |
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>{})); | |
b47425e4 JB |
78 | return; |
79 | } | |
3eab5e87 | 80 | @@ -160,7 +160,7 @@ |
8c4aad5f | 81 | ) |
b47425e4 | 82 | { |
8c4aad5f | 83 | error_code err(errors::unsupported_url_protocol); |
3eab5e87 JB |
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>{})); | |
b47425e4 JB |
87 | return; |
88 | } | |
3eab5e87 | 89 | @@ -258,7 +258,7 @@ |
b47425e4 JB |
90 | |
91 | if (ec) | |
92 | { | |
3eab5e87 JB |
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>{})); | |
b47425e4 JB |
96 | return; |
97 | } | |
3eab5e87 JB |
98 | @@ -297,7 +297,7 @@ |
99 | #if TORRENT_USE_I2P | |
8c4aad5f JB |
100 | if (i2p_conn->proxy().type != settings_pack::i2p_proxy) |
101 | { | |
3eab5e87 JB |
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>{})); | |
8c4aad5f JB |
105 | return; |
106 | } | |
3eab5e87 | 107 | @@ -332,7 +332,7 @@ |
8c4aad5f JB |
108 | m_ssl_ctx->set_verify_mode(ssl::context::verify_none, ec); |
109 | if (ec) | |
110 | { | |
3eab5e87 JB |
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>{})); | |
8c4aad5f JB |
114 | return; |
115 | } | |
3eab5e87 | 116 | @@ -344,7 +344,7 @@ |
8c4aad5f | 117 | // assume this is not a tracker connection. Tracker connections that |
3eab5e87 | 118 | // shouldn't be subject to the proxy should pass in nullptr as the proxy |
8c4aad5f JB |
119 | // pointer. |
120 | - instantiate_connection(m_timer.get_io_service() | |
121 | + instantiate_connection(libtorrent::get_io_service(m_timer) | |
3eab5e87 | 122 | , proxy ? *proxy : null_proxy, m_sock, userdata, nullptr, false, false); |
8c4aad5f JB |
123 | |
124 | if (m_bind_addr) | |
3eab5e87 | 125 | @@ -353,7 +353,7 @@ |
8c4aad5f | 126 | m_sock.bind(tcp::endpoint(*m_bind_addr, 0), ec); |
b47425e4 JB |
127 | if (ec) |
128 | { | |
3eab5e87 JB |
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>{})); | |
b47425e4 JB |
132 | return; |
133 | } | |
3eab5e87 | 134 | @@ -362,7 +362,7 @@ |
b47425e4 JB |
135 | setup_ssl_hostname(m_sock, hostname, ec); |
136 | if (ec) | |
137 | { | |
3eab5e87 JB |
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>{})); | |
b47425e4 JB |
141 | return; |
142 | } | |
3eab5e87 JB |
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 | |
147 | if (device.empty()) | |
148 | { | |
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 | |
152 | // routing table | |
153 | ec.clear(); | |
154 | } | |
b47425e4 | 155 | |
3eab5e87 JB |
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); | |
159 | ||
160 | if (!route) | |
161 | @@ -194,7 +194,7 @@ | |
162 | if (local_address.is_unspecified()) | |
b47425e4 | 163 | { |
3eab5e87 JB |
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); | |
167 | ||
168 | auto const it = std::find_if(net.begin(), net.end(), [&](ip_interface const& i) | |
169 | { | |
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 @@ | |
8c4aad5f JB |
173 | void lsd::start(error_code& ec) |
174 | { | |
3eab5e87 | 175 | m_socket.open(std::bind(&lsd::on_announce, self(), _1, _2) |
8c4aad5f JB |
176 | - , m_broadcast_timer.get_io_service(), ec); |
177 | + , libtorrent::get_io_service(m_broadcast_timer), ec); | |
178 | if (ec) return; | |
179 | ||
3eab5e87 | 180 | m_socket6.open(std::bind(&lsd::on_announce, self(), _1, _2) |
8c4aad5f JB |
181 | - , m_broadcast_timer.get_io_service(), ec); |
182 | + , libtorrent::get_io_service(m_broadcast_timer), ec); | |
8c4aad5f | 183 | } |
b47425e4 | 184 | |
3eab5e87 JB |
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 | |
188 | @@ -121,7 +121,7 @@ | |
189 | ||
8c4aad5f | 190 | error_code ec; |
3eab5e87 | 191 | m_socket.open(std::bind(&upnp::on_reply, self(), _1, _2) |
8c4aad5f JB |
192 | - , m_refresh_timer.get_io_service(), ec); |
193 | + , libtorrent::get_io_service(m_refresh_timer), ec); | |
b47425e4 | 194 | |
8c4aad5f JB |
195 | m_mappings.reserve(10); |
196 | } | |
3eab5e87 JB |
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 | |
199 | @@ -174,7 +174,7 @@ | |
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))); | |
205 | } | |
206 | } | |
207 | ||
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 | |
210 | @@ -492,7 +492,7 @@ | |
211 | { | |
212 | // connect to socks5 server and open up the UDP tunnel | |
213 | ||
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); | |
217 | } | |
218 | } | |
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 | |
221 | @@ -130,7 +130,7 @@ | |
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) | |
229 | , m_storage)); |