forked from premiere/premiere-libtorrent
don't try IPv6 on windows if it's not installed
This commit is contained in:
parent
d4e08cd37f
commit
db9236fcf8
|
@ -54,6 +54,7 @@ release 0.14.3
|
||||||
* fixed CIDR-distance calculation in the precense of IPv6 peers
|
* fixed CIDR-distance calculation in the precense of IPv6 peers
|
||||||
* save partial resume data for torrents that are queued for checking
|
* save partial resume data for torrents that are queued for checking
|
||||||
or checking, to maintain stats and renamed files
|
or checking, to maintain stats and renamed files
|
||||||
|
* Don't try IPv6 on windows if it's not installed
|
||||||
|
|
||||||
release 0.14.2
|
release 0.14.2
|
||||||
|
|
||||||
|
|
|
@ -725,6 +725,15 @@ namespace aux {
|
||||||
async_accept(s.sock);
|
async_accept(s.sock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#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)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
|
||||||
s = setup_listener(
|
s = setup_listener(
|
||||||
tcp::endpoint(address_v6::any(), m_listen_interface.port())
|
tcp::endpoint(address_v6::any(), m_listen_interface.port())
|
||||||
, m_listen_port_retries, true);
|
, m_listen_port_retries, true);
|
||||||
|
@ -734,6 +743,9 @@ namespace aux {
|
||||||
m_listen_sockets.push_back(s);
|
m_listen_sockets.push_back(s);
|
||||||
async_accept(s.sock);
|
async_accept(s.sock);
|
||||||
}
|
}
|
||||||
|
#ifdef TORRENT_WINDOWS
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue