From e1f5699f262d52e72d6855440cfc1c2919b74163 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Wed, 30 Mar 2011 16:39:14 +0100 Subject: Don't reinitialise udp socket when IP versions don't match An IPv6 socket can send to IPv4 addresses when in a dual mode stack. On symbian, autobinded sockets have the ::0 local address rather than 0.0.0.0 - this check was causing the socket to be destroyed and recreated with every call to writeDatagram. Reviewed-by: Markus Goetz --- src/network/socket/qudpsocket.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/socket/qudpsocket.cpp b/src/network/socket/qudpsocket.cpp index 4334f68..dc473c6 100644 --- a/src/network/socket/qudpsocket.cpp +++ b/src/network/socket/qudpsocket.cpp @@ -202,7 +202,7 @@ bool QUdpSocketPrivate::doEnsureInitialized(const QHostAddress &bindAddress, qui #endif // now check if the socket engine is initialized and to the right type - if (!socketEngine || !socketEngine->isValid() || socketEngine->protocol() != proto) { + if (!socketEngine || !socketEngine->isValid()) { resolveProxy(remoteAddress.toString(), bindPort); if (!initSocketLayer(address->protocol())) return false; -- cgit v0.12