mirror of
https://github.com/deneraraujo/OpenVPNAdapter.git
synced 2026-02-11 00:00:08 +08:00
Revert patches
This commit is contained in:
@@ -950,8 +950,6 @@ public:
|
||||
{
|
||||
const protocol_type protocol = peer_endpoint.protocol();
|
||||
impl_.get_service().open(impl_.get_implementation(), protocol, open_ec);
|
||||
if (!open_ec)
|
||||
async_connect_post_open(protocol, open_ec);
|
||||
}
|
||||
|
||||
return async_initiate<ConnectHandler, void (asio::error_code)>(
|
||||
@@ -1802,11 +1800,6 @@ protected:
|
||||
#endif
|
||||
|
||||
private:
|
||||
// optional user code hook immediately after socket open in async_connect
|
||||
virtual void async_connect_post_open(const protocol_type& protocol, asio::error_code& ec)
|
||||
{
|
||||
}
|
||||
|
||||
// Disallow copying and assignment.
|
||||
basic_socket(const basic_socket&) ASIO_DELETED;
|
||||
basic_socket& operator=(const basic_socket&) ASIO_DELETED;
|
||||
|
||||
@@ -3339,23 +3339,6 @@ asio::error_code getaddrinfo(const char* host,
|
||||
# endif
|
||||
#elif !defined(ASIO_HAS_GETADDRINFO)
|
||||
int error = getaddrinfo_emulation(host, service, &hints, result);
|
||||
return ec = translate_addrinfo_error(error);
|
||||
#elif defined(ASIO_HAS_GETADDRINFO) && defined(ASIO_APPLE_NAT64)
|
||||
// For NAT64 compatibility, Apple recommends to set AI_DEFAULT flags
|
||||
addrinfo_type new_hints = hints;
|
||||
new_hints.ai_flags |= AI_DEFAULT;
|
||||
int error = ::getaddrinfo(host, service, &new_hints, result);
|
||||
|
||||
// iOS bug workaround: sometimes iOS getaddrinfo() returns a non-zero scope ID
|
||||
// for non-link-local addresses. Workaround by forcing scope ID to 0 for
|
||||
// non-link-local addresses.
|
||||
if (!error && (*result)->ai_family == AF_INET6)
|
||||
{
|
||||
sockaddr_in6* a6 = (sockaddr_in6*)(*result)->ai_addr;
|
||||
if (a6->sin6_scope_id && !(IN6_IS_ADDR_LINKLOCAL(&a6->sin6_addr) || IN6_IS_ADDR_MC_NODELOCAL(&a6->sin6_addr) || IN6_IS_ADDR_MC_LINKLOCAL(&a6->sin6_addr)))
|
||||
a6->sin6_scope_id = 0;
|
||||
}
|
||||
|
||||
return ec = translate_addrinfo_error(error);
|
||||
#else
|
||||
int error = ::getaddrinfo(host, service, &hints, result);
|
||||
|
||||
@@ -80,7 +80,7 @@ public:
|
||||
DWORD length = ::FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER
|
||||
| FORMAT_MESSAGE_FROM_SYSTEM
|
||||
| FORMAT_MESSAGE_IGNORE_INSERTS, 0, value,
|
||||
MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), (char*)&msg, 0, 0);
|
||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (char*)&msg, 0, 0);
|
||||
detail::local_free_on_block_exit local_free_obj(msg);
|
||||
if (length && msg[length - 1] == '\n')
|
||||
msg[--length] = '\0';
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#include "asio/detail/config.hpp"
|
||||
#include <cstddef>
|
||||
#include <cstring>
|
||||
#include <algorithm>
|
||||
#include "asio/detail/socket_ops.hpp"
|
||||
#include "asio/detail/socket_types.hpp"
|
||||
#include "asio/ip/basic_resolver_iterator.hpp"
|
||||
@@ -300,12 +299,6 @@ public:
|
||||
return !a.equal(b);
|
||||
}
|
||||
|
||||
template <typename Random>
|
||||
void randomize(Random& r)
|
||||
{
|
||||
std::shuffle(this->values_->begin(), this->values_->end(), r);
|
||||
}
|
||||
|
||||
private:
|
||||
typedef std::vector<basic_resolver_entry<InternetProtocol> > values_type;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user