improved IPv6 support (skips unsupported tests on windows)
This commit is contained in:
@@ -737,27 +737,19 @@ namespace aux {
|
||||
}
|
||||
|
||||
#if TORRENT_USE_IPV6
|
||||
#ifdef TORRENT_WINDOWS
|
||||
// only try to open the IPv6 port if IPv6 is installed
|
||||
SOCKADDR_STORAGE storage;
|
||||
int len = sizeof(storage);
|
||||
if (WSAStringToAddressA("::1", AF_INET6, 0,
|
||||
(sockaddr*)&storage, &len) != SOCKET_ERROR)
|
||||
if (supports_ipv6())
|
||||
{
|
||||
#endif
|
||||
s = setup_listener(
|
||||
tcp::endpoint(address_v6::any(), m_listen_interface.port())
|
||||
, m_listen_port_retries, true);
|
||||
|
||||
s = setup_listener(
|
||||
tcp::endpoint(address_v6::any(), m_listen_interface.port())
|
||||
, m_listen_port_retries, true);
|
||||
|
||||
if (s.sock)
|
||||
{
|
||||
m_listen_sockets.push_back(s);
|
||||
async_accept(s.sock);
|
||||
if (s.sock)
|
||||
{
|
||||
m_listen_sockets.push_back(s);
|
||||
async_accept(s.sock);
|
||||
}
|
||||
}
|
||||
#ifdef TORRENT_WINDOWS
|
||||
}
|
||||
#endif
|
||||
#endif // TORRENT_USE_IPV6
|
||||
|
||||
// set our main IPv4 and IPv6 interfaces
|
||||
|
Reference in New Issue
Block a user