[MPlayer-cvslog] r30661 - trunk/stream/tcp.c

reimar subversion at mplayerhq.hu
Sat Feb 20 12:13:01 CET 2010


Author: reimar
Date: Sat Feb 20 12:13:01 2010
New Revision: 30661

Log:
Make sure we do not try to use IPv6 with winsock2, we end up connecting
to random addresses, causing huge delays.

Modified:
   trunk/stream/tcp.c

Modified: trunk/stream/tcp.c
==============================================================================
--- trunk/stream/tcp.c	Sat Feb 20 00:35:21 2010	(r30660)
+++ trunk/stream/tcp.c	Sat Feb 20 12:13:01 2010	(r30661)
@@ -99,6 +99,14 @@ connect2Server_with_af(char *host, int p
 	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);
 
 


More information about the MPlayer-cvslog mailing list