summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2010-06-20 11:15:52 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2010-06-20 11:15:52 (GMT)
commitf5bab2bc74ed03fd1db99cba3830b6b21795a627 (patch)
treeb10c428a9b482354c5366e920a2a3359b676f82c /src/network
parent489cface92f40f4e82866b5fabf57d29e9632811 (diff)
parenta27f18db247a0456ca15ad58f8dcc6b3441d55d0 (diff)
downloadQt-f5bab2bc74ed03fd1db99cba3830b6b21795a627.zip
Qt-f5bab2bc74ed03fd1db99cba3830b6b21795a627.tar.gz
Qt-f5bab2bc74ed03fd1db99cba3830b6b21795a627.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into qt-4.7-from-4.6
src/3rdparty/* is left untouched and not merged from 4.6. The corresponding changes in Harfbuzz and WebKit are already in the 4.6 staging areas. Conflicts: src/3rdparty/webkit/VERSION src/3rdparty/webkit/WebCore/ChangeLog src/3rdparty/webkit/WebKit/qt/ChangeLog src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.cpp src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.qrc tests/auto/qtextlayout/tst_qtextlayout.cpp tests/auto/qwidgetaction/tst_qwidgetaction.cpp
Diffstat (limited to 'src/network')
-rw-r--r--src/network/socket/qlocalsocket_win.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/network/socket/qlocalsocket_win.cpp b/src/network/socket/qlocalsocket_win.cpp
index 5486f47..4907f2c 100644
--- a/src/network/socket/qlocalsocket_win.cpp
+++ b/src/network/socket/qlocalsocket_win.cpp
@@ -280,6 +280,12 @@ void QLocalSocketPrivate::startAsyncRead()
case ERROR_IO_PENDING:
// This is not an error. We're getting notified, when data arrives.
return;
+ case ERROR_MORE_DATA:
+ // This is not an error. The synchronous read succeeded.
+ // We're connected to a message mode pipe and the message
+ // didn't fit into the pipe's system buffer.
+ completeAsyncRead();
+ break;
case ERROR_PIPE_NOT_CONNECTED:
{
// It may happen, that the other side closes the connection directly
@@ -309,9 +315,18 @@ bool QLocalSocketPrivate::completeAsyncRead()
DWORD bytesRead;
if (!GetOverlappedResult(handle, &overlapped, &bytesRead, TRUE)) {
- if (GetLastError() != ERROR_PIPE_NOT_CONNECTED)
+ switch (GetLastError()) {
+ case ERROR_MORE_DATA:
+ // This is not an error. We're connected to a message mode
+ // pipe and the message didn't fit into the pipe's system
+ // buffer. We will read the remaining data in the next call.
+ break;
+ case ERROR_PIPE_NOT_CONNECTED:
setErrorString(QLatin1String("QLocalSocketPrivate::completeAsyncRead"));
- return false;
+ // fall through
+ default:
+ return false;
+ }
}
actualReadBufferSize += bytesRead;