mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 01:37:00 +00:00
Some missing from merge.
Signed-off-by: Salja <salja2012@hotmail.de>
This commit is contained in:
parent
ec939a5bce
commit
f4be15a7af
1895 changed files with 160408 additions and 53601 deletions
|
|
@ -1,12 +1,11 @@
|
|||
// $Id: SOCK_Connector.cpp 97699 2014-04-08 20:08:26Z mesnier_p $
|
||||
|
||||
#include "ace/SOCK_Connector.h"
|
||||
#include "ace/INET_Addr.h"
|
||||
#include "ace/Log_Category.h"
|
||||
#include "ace/OS_NS_unistd.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_HAS_WINCE)
|
||||
#include "ace/OS_QoS.h"
|
||||
|
|
@ -196,19 +195,6 @@ ACE_SOCK_Connector::connect (ACE_SOCK_Stream &new_stream,
|
|||
local_sap) == -1)
|
||||
return -1;
|
||||
|
||||
#if defined(ACE_WIN32) && defined(ACE_HAS_IPV6)
|
||||
// On windows, the IPv4-mapped IPv6 address format can only be used on a dual-stack socket.
|
||||
const ACE_INET_Addr& remote_address = static_cast<const ACE_INET_Addr&>(remote_sap);
|
||||
if (remote_address.is_ipv4_mapped_ipv6()) {
|
||||
int zero = 0;
|
||||
ACE_OS::setsockopt(new_stream.get_handle(),
|
||||
IPPROTO_IPV6,
|
||||
IPV6_V6ONLY,
|
||||
(char *)&zero,
|
||||
sizeof(zero));
|
||||
}
|
||||
#endif
|
||||
|
||||
int result = ACE_OS::connect (new_stream.get_handle (),
|
||||
reinterpret_cast<sockaddr *> (remote_sap.get_addr ()),
|
||||
remote_sap.get_size ());
|
||||
|
|
@ -244,19 +230,6 @@ ACE_SOCK_Connector::connect (ACE_SOCK_Stream &new_stream,
|
|||
local_sap) == -1)
|
||||
return -1;
|
||||
|
||||
#if defined(ACE_WIN32) && defined(ACE_HAS_IPV6)
|
||||
// On windows, the IPv4-mapped IPv6 address format can only be used on a dual-stack socket.
|
||||
const ACE_INET_Addr& remote_address = static_cast<const ACE_INET_Addr&>(remote_sap);
|
||||
if (remote_address.is_ipv4_mapped_ipv6()) {
|
||||
int zero = 0;
|
||||
ACE_OS::setsockopt(new_stream.get_handle(),
|
||||
IPPROTO_IPV6,
|
||||
IPV6_V6ONLY,
|
||||
(char *)&zero,
|
||||
sizeof(zero));
|
||||
}
|
||||
#endif
|
||||
|
||||
int result = ACE_OS::connect (new_stream.get_handle (),
|
||||
reinterpret_cast<sockaddr *> (remote_sap.get_addr ()),
|
||||
remote_sap.get_size (),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue