diff options
author | Martin Petersson <martin.petersson@nokia.com> | 2011-02-18 13:29:33 (GMT) |
---|---|---|
committer | Martin Petersson <martin.petersson@nokia.com> | 2011-02-18 13:29:33 (GMT) |
commit | fcb5db93099cbd7ed7c3a02650aad1d49e999d81 (patch) | |
tree | a7c526cdd640dc29271ef93a97c98040419b2768 | |
parent | bd960fb92164cbf5b673ed7590601381f16b5fa4 (diff) | |
download | Qt-fcb5db93099cbd7ed7c3a02650aad1d49e999d81.zip Qt-fcb5db93099cbd7ed7c3a02650aad1d49e999d81.tar.gz Qt-fcb5db93099cbd7ed7c3a02650aad1d49e999d81.tar.bz2 |
QNativeSocketEngine: Check for WSAEADDRNOTAVAIL on Windows.
This fixes the tst_qnetworkreply getFromUnreachableIp() test on Windows.
Reviewed-by: Markus Goetz
-rw-r--r-- | src/network/socket/qnativesocketengine_win.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/network/socket/qnativesocketengine_win.cpp b/src/network/socket/qnativesocketengine_win.cpp index ac2aa87..940569a 100644 --- a/src/network/socket/qnativesocketengine_win.cpp +++ b/src/network/socket/qnativesocketengine_win.cpp @@ -641,6 +641,11 @@ bool QNativeSocketEnginePrivate::nativeConnect(const QHostAddress &address, quin socketState = QAbstractSocket::UnconnectedState; break; } + if (value == WSAEADDRNOTAVAIL) { + setError(QAbstractSocket::NetworkError, AddressNotAvailableErrorString); + socketState = QAbstractSocket::UnconnectedState; + break; + } } // fall through } |