summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@accenture.com>2011-03-30 15:39:14 (GMT)
committerShane Kearns <shane.kearns@accenture.com>2011-04-05 10:20:33 (GMT)
commite1f5699f262d52e72d6855440cfc1c2919b74163 (patch)
tree2e573434218ebb02b13b48853e7a0b1fe337fa53 /src/network
parentf7a6e37cab7a68451b176d22acf34ed41d4f1d79 (diff)
downloadQt-e1f5699f262d52e72d6855440cfc1c2919b74163.zip
Qt-e1f5699f262d52e72d6855440cfc1c2919b74163.tar.gz
Qt-e1f5699f262d52e72d6855440cfc1c2919b74163.tar.bz2
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
Diffstat (limited to 'src/network')
-rw-r--r--src/network/socket/qudpsocket.cpp2
1 files changed, 1 insertions, 1 deletions
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;