From 1f46cf2aa1a0a1c0d60cfaea63b572bd8a65a0cd Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Wed, 6 Jan 2010 10:05:09 +0100 Subject: QAbstractSocket: Warn when wrong QHostInfo was received Let's see if this happens. Reviewed-by: Thiago --- src/network/socket/qabstractsocket.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp index 8b4f364..0d35f2d 100644 --- a/src/network/socket/qabstractsocket.cpp +++ b/src/network/socket/qabstractsocket.cpp @@ -873,6 +873,10 @@ void QAbstractSocketPrivate::_q_startConnecting(const QHostInfo &hostInfo) if (state != QAbstractSocket::HostLookupState) return; + if (hostLookupId != -1 && hostLookupId != hostInfo.lookupId()) { + qWarning("QAbstractSocketPrivate::_q_startConnecting() received hostInfo for wrong lookup ID %d expected %d", hostInfo.lookupId(), hostLookupId); + } + addresses = hostInfo.addresses(); #if defined(QABSTRACTSOCKET_DEBUG) -- cgit v0.12