chore(Deps/Acelite): Update to 6.5.10 (#3450)

This commit is contained in:
Kargatum
2020-11-11 22:09:02 +07:00
committed by GitHub
parent a93565b6da
commit e27201cee2
921 changed files with 18238 additions and 33164 deletions

View File

@@ -5,6 +5,9 @@
#include "ace/OS_NS_string.h"
#include "ace/OS_NS_sys_socket.h"
#include "ace/os_include/os_fcntl.h"
#if defined (ACE_HAS_ALLOC_HOOKS)
# include "ace/Malloc_Base.h"
#endif /* ACE_HAS_ALLOC_HOOKS */
#if !defined (__ACE_INLINE__)
#include "ace/SOCK_Acceptor.inl"
@@ -218,12 +221,15 @@ ACE_SOCK_Acceptor::dump (void) const
int
ACE_SOCK_Acceptor::shared_open (const ACE_Addr &local_sap,
int protocol_family,
int backlog)
int backlog,
int ipv6_only)
{
ACE_TRACE ("ACE_SOCK_Acceptor::shared_open");
int error = 0;
#if defined (ACE_HAS_IPV6)
#if !defined (ACE_HAS_IPV6)
ACE_UNUSED_ARG (ipv6_only);
#else /* defined (ACE_HAS_IPV6) */
if (protocol_family == PF_INET6)
{
sockaddr_in6 local_inet6_addr;
@@ -240,29 +246,31 @@ ACE_SOCK_Acceptor::shared_open (const ACE_Addr &local_sap,
else
local_inet6_addr = *reinterpret_cast<sockaddr_in6 *> (local_sap.get_addr ());
# if defined (ACE_WIN32)
// on windows vista and later, Winsock can support dual stack sockets
// but this must be explicitly set prior to the bind. Since this
// behavior is the default on *nix platforms, it should be benigh to
// just do it here. On older platforms the setsockopt will fail, but
// that should be OK.
int zero = 0;
ACE_OS::setsockopt (this->get_handle (),
IPPROTO_IPV6,
IPV6_V6ONLY,
(char *)&zero,
sizeof (zero));
# endif /* ACE_WIN32 */
// We probably don't need a bind_port written here.
// There are currently no supported OS's that define
// ACE_LACKS_WILDCARD_BIND.
if (ACE_OS::bind (this->get_handle (),
reinterpret_cast<sockaddr *> (&local_inet6_addr),
sizeof local_inet6_addr) == -1)
/*
* Handle IPv6-only requests. On Windows, v6-only is the default
* unless it is turned off. On Linux, v4/v6 dual is the default
* unless v6-only is turned on.
* This must be done before attempting to bind the address.
* On Windows older than Vista this will fail.
*/
int setting = !!ipv6_only;
if (-1 == ACE_OS::setsockopt (this->get_handle (),
IPPROTO_IPV6,
IPV6_V6ONLY,
(char *)&setting,
sizeof (setting)))
error = 1;
else
// We probably don't need a bind_port written here.
// There are currently no supported OS's that define
// ACE_LACKS_WILDCARD_BIND.
if (ACE_OS::bind (this->get_handle (),
reinterpret_cast<sockaddr *> (&local_inet6_addr),
sizeof local_inet6_addr) == -1)
error = 1;
}
else
#endif
#endif /* ACE_HAS_IPV6 */
if (protocol_family == PF_INET)
{
sockaddr_in local_inet_addr;
@@ -312,7 +320,8 @@ ACE_SOCK_Acceptor::open (const ACE_Addr &local_sap,
int reuse_addr,
int protocol_family,
int backlog,
int protocol)
int protocol,
int ipv6_only)
{
ACE_TRACE ("ACE_SOCK_Acceptor::open");
@@ -330,7 +339,8 @@ ACE_SOCK_Acceptor::open (const ACE_Addr &local_sap,
else
return this->shared_open (local_sap,
protocol_family,
backlog);
backlog,
ipv6_only);
}
ACE_SOCK_Acceptor::ACE_SOCK_Acceptor (const ACE_Addr &local_sap,
@@ -340,7 +350,8 @@ ACE_SOCK_Acceptor::ACE_SOCK_Acceptor (const ACE_Addr &local_sap,
int reuse_addr,
int protocol_family,
int backlog,
int protocol)
int protocol,
int ipv6_only)
{
ACE_TRACE ("ACE_SOCK_Acceptor::ACE_SOCK_Acceptor");
if (this->open (local_sap,
@@ -350,7 +361,8 @@ ACE_SOCK_Acceptor::ACE_SOCK_Acceptor (const ACE_Addr &local_sap,
reuse_addr,
protocol_family,
backlog,
protocol) == -1)
protocol,
ipv6_only) == -1)
ACELIB_ERROR ((LM_ERROR,
ACE_TEXT ("%p\n"),
ACE_TEXT ("ACE_SOCK_Acceptor")));
@@ -363,7 +375,8 @@ ACE_SOCK_Acceptor::open (const ACE_Addr &local_sap,
int reuse_addr,
int protocol_family,
int backlog,
int protocol)
int protocol,
int ipv6_only)
{
ACE_TRACE ("ACE_SOCK_Acceptor::open");
@@ -386,7 +399,8 @@ ACE_SOCK_Acceptor::open (const ACE_Addr &local_sap,
else
return this->shared_open (local_sap,
protocol_family,
backlog);
backlog,
ipv6_only);
}
// General purpose routine for performing server ACE_SOCK creation.
@@ -395,14 +409,16 @@ ACE_SOCK_Acceptor::ACE_SOCK_Acceptor (const ACE_Addr &local_sap,
int reuse_addr,
int protocol_family,
int backlog,
int protocol)
int protocol,
int ipv6_only)
{
ACE_TRACE ("ACE_SOCK_Acceptor::ACE_SOCK_Acceptor");
if (this->open (local_sap,
reuse_addr,
protocol_family,
backlog,
protocol) == -1)
protocol,
ipv6_only) == -1)
ACELIB_ERROR ((LM_ERROR,
ACE_TEXT ("%p\n"),
ACE_TEXT ("ACE_SOCK_Acceptor")));