diff options
author | Andreas Kling <andreas.kling@nokia.com> | 2010-01-20 14:03:41 (GMT) |
---|---|---|
committer | Andreas Kling <andreas.kling@nokia.com> | 2010-01-20 14:03:41 (GMT) |
commit | 564b32499ef520c804eb92bc6aefa4abcea38a00 (patch) | |
tree | 70f0a01654a1da77f86ca02cf990f0464389a524 | |
parent | eac2869ec3aa0d7937548d0caa6b19e0f8918c83 (diff) | |
parent | 786d3c5dc1ba34d8f1a123f1fb100f21a5d7c26b (diff) | |
download | Qt-564b32499ef520c804eb92bc6aefa4abcea38a00.zip Qt-564b32499ef520c804eb92bc6aefa4abcea38a00.tar.gz Qt-564b32499ef520c804eb92bc6aefa4abcea38a00.tar.bz2 |
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6
-rw-r--r-- | src/network/socket/qnativesocketengine_win.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/network/socket/qnativesocketengine_win.cpp b/src/network/socket/qnativesocketengine_win.cpp index 8257545..7088a57 100644 --- a/src/network/socket/qnativesocketengine_win.cpp +++ b/src/network/socket/qnativesocketengine_win.cpp @@ -1007,21 +1007,21 @@ qint64 QNativeSocketEnginePrivate::nativeWrite(const char *data, qint64 len) ret += qint64(bytesWritten); + int err; if (socketRet != SOCKET_ERROR) { if (ret == len) break; else continue; - } else if (WSAGetLastError() == WSAEWOULDBLOCK) { + } else if ((err = WSAGetLastError()) == WSAEWOULDBLOCK) { break; - } else if (WSAGetLastError() == WSAENOBUFS) { + } else if (err == WSAENOBUFS) { // this function used to not send more than 49152 per call to WSASendTo // to avoid getting a WSAENOBUFS. However this is a performance regression // and we think it only appears with old windows versions. We now handle the // WSAENOBUFS and hope it never appears anyway. // just go on, the next loop run we will try a smaller number } else { - int err = WSAGetLastError(); WS_ERROR_DEBUG(err); switch (err) { case WSAECONNRESET: |