From 74b5e8b68a586eae6fb41d97ef5aa9132633c2a2 Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 20 Feb 2010 11:13:01 +0000 Subject: Make sure we do not try to use IPv6 with winsock2, we end up connecting to random addresses, causing huge delays. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30661 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/tcp.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'stream') diff --git a/stream/tcp.c b/stream/tcp.c index cf067c2ee7..5dfaa8304f 100644 --- a/stream/tcp.c +++ b/stream/tcp.c @@ -99,6 +99,14 @@ connect2Server_with_af(char *host, int port, int af,int verb) { struct timeval to; #endif +#if HAVE_WINSOCK2_H && defined(HAVE_AF_INET6) + // our winsock name resolution code can not handle IPv6 + if (af == AF_INET6) { + mp_msg(MSGT_NETWORK, MSGL_WARN, "IPv6 not supported for winsock2\n"); + return TCP_ERROR_FATAL; + } +#endif + socket_server_fd = socket(af, SOCK_STREAM, 0); -- cgit v1.2.3