merged RC_1_1 into master

This commit is contained in:
arvidn 2018-07-20 09:28:21 +02:00
commit f4b0dbf115
4 changed files with 13 additions and 19 deletions

View File

@ -87,6 +87,7 @@
* resume data no longer has timestamps of files
* require C++11 to build libtorrent
* uTP connections are no longer exempt from rate limits by default
* fix exporting files from partfile while seeding
* fix potential deadlock on Windows, caused by performing restricted
tasks from within DllMain

View File

@ -814,13 +814,11 @@ based peer class assignment:
ip_filter f;
// for every IPv4 address, assign the global peer class
f.add_rule(address_v4::from_string("0.0.0.0")
, address_v4::from_string("255.255.255.255")
, mask);
f.add_rule(make_address("0.0.0.0"), make_address("255.255.255.255"), mask);
// for every IPv6 address, assign the global peer class
f.add_rule(address_v6::from_string("::")
, address_v6::from_string("ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff")
f.add_rule(make_address("::")
, make_address("ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff")
, mask);
ses.set_peer_class_filter(f);
@ -828,7 +826,7 @@ To make uTP sockets exempt from rate limiting:
.. code:: c++
peer_class_type_filter flt;
peer_class_type_filter flt = ses.get_peer_class_type_filter();
// filter out the global and local peer class for uTP sockets, if these
// classes are set by the IP filter
flt.disallow(peer_class_type_filter::utp_socket, session::global_peer_class_id);
@ -848,14 +846,10 @@ To make all peers on the internal network unthrottled:
ip_filter f;
// for every IPv4 address, assign the global peer class
f.add_rule(address_v4::from_string("0.0.0.0")
, address_v4::from_string("255.255.255.255")
, mask);
f.add_rule(make_address("0.0.0.0"), make_address("255.255.255.255"), mask);
// for every address on the local metwork, set the mastk to 0
f.add_rule(address_v4::from_string("10.0.0.0")
, address_v4::from_string("10.255.255.255")
, 0);
// for every address on the local metwork, set the mask to 0
f.add_rule(make_address("10.0.0.0"), make_address("10.255.255.255"), 0);
ses.set_peer_class_filter(f);
SSL torrents

View File

@ -619,10 +619,9 @@ namespace libtorrent {
//
// .. code:: c++
//
// ip_filter f;
// ip_filter f = ses.get_peer_class_filter();
// peer_class_t my_class = ses.create_peer_class("200.1.x.x IP range");
// f.add_rule(address_v4::from_string("200.1.1.0")
// , address_v4::from_string("200.1.255.255")
// f.add_rule(make_address("200.1.1.0"), make_address("200.1.255.255")
// , 1 << static_cast<std::uint32_t>(my_class));
// ses.set_peer_class_filter(f);
//

View File

@ -1001,7 +1001,7 @@ namespace aux {
return m_classes.new_peer_class(name);
}
void session_impl::delete_peer_class(peer_class_t cid)
void session_impl::delete_peer_class(peer_class_t const cid)
{
TORRENT_ASSERT(is_single_thread());
// if you hit this assert, you're deleting a non-existent peer class
@ -1088,7 +1088,7 @@ namespace aux {
}
}
void session_impl::set_peer_class(peer_class_t cid, peer_class_info const& pci)
void session_impl::set_peer_class(peer_class_t const cid, peer_class_info const& pci)
{
peer_class* pc = m_classes.at(cid);
// if you hit this assert, you're passing in an invalid cid
@ -6201,7 +6201,7 @@ namespace aux {
{
return download_rate_limit(m_global_class);
}
#endif
#endif // DEPRECATE
namespace {