summaryrefslogtreecommitdiffstats
path: root/src/network/socket/qudpsocket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/socket/qudpsocket.cpp')
-rw-r--r--src/network/socket/qudpsocket.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/network/socket/qudpsocket.cpp b/src/network/socket/qudpsocket.cpp
index 6a62b12ca2..f8bcd1b967 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;
@@ -338,6 +338,8 @@ bool QUdpSocket::bind(quint16 port, BindMode mode)
return bind(QHostAddress::Any, port, mode);
}
+#ifndef QT_NO_NETWORKINTERFACE
+
/*!
\since 4.8
@@ -444,6 +446,8 @@ void QUdpSocket::setMulticastInterface(const QNetworkInterface &iface)
d->socketEngine->setMulticastInterface(iface);
}
+#endif // QT_NO_NETWORKINTERFACE
+
/*!
Returns true if at least one datagram is waiting to be read;
otherwise returns false.
@@ -504,16 +508,6 @@ qint64 QUdpSocket::writeDatagram(const char *data, qint64 size, const QHostAddre
return -1;
qint64 sent = d->socketEngine->writeDatagram(data, size, address, port);
-#ifdef Q_OS_SYMBIAN
- if( QSysInfo::s60Version() <= QSysInfo::SV_S60_5_0 ) {
- // This is evil hack, but for some reason native RSocket::SendTo returns 0,
- // for large datagrams (such as 600 bytes). Based on comments from Open C team
- // this should happen only in platforms <= S60 5.0.
- // As an workaround, we just set sent = size
- if( sent == 0 )
- sent = size;
- }
-#endif
d->cachedSocketDescriptor = d->socketEngine->socketDescriptor();
if (sent >= 0) {