summaryrefslogtreecommitdiffstats
path: root/src/network/socket/qnativesocketengine_unix.cpp
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2009-05-06 12:23:59 (GMT)
committerJanne Anttila <janne.anttila@digia.com>2009-05-06 12:23:59 (GMT)
commite6485b618cc8126d361e41c8a2c7862f604498cc (patch)
treec2df79d3e80d52eb84ced10ce78fba47ffb4d3b4 /src/network/socket/qnativesocketengine_unix.cpp
parentee1899224a9622add24d3a7f94034197db838fee (diff)
downloadQt-e6485b618cc8126d361e41c8a2c7862f604498cc.zip
Qt-e6485b618cc8126d361e41c8a2c7862f604498cc.tar.gz
Qt-e6485b618cc8126d361e41c8a2c7862f604498cc.tar.bz2
Added some debug information for nativeSelect in Symbian OS
Diffstat (limited to 'src/network/socket/qnativesocketengine_unix.cpp')
-rw-r--r--src/network/socket/qnativesocketengine_unix.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/network/socket/qnativesocketengine_unix.cpp b/src/network/socket/qnativesocketengine_unix.cpp
index 0e0980c..e000e11 100644
--- a/src/network/socket/qnativesocketengine_unix.cpp
+++ b/src/network/socket/qnativesocketengine_unix.cpp
@@ -913,8 +913,8 @@ int QNativeSocketEnginePrivate::nativeSelect(int timeout, bool selectForRead) co
#ifdef Q_OS_SYMBIAN
bool selectForExec = FD_ISSET(socketDescriptor, &fdexec);
if(selectForExec) {
- qWarning("nativeSelect (selectForRead %d, retVal %d) Unexpected expectfds ready in fd %d",
- selectForRead, retval, socketDescriptor);
+ qWarning("nativeSelect (selectForRead %d, retVal %d, errno %d) Unexpected expectfds ready in fd %d",
+ selectForRead, retval, errno, socketDescriptor);
}
#endif
@@ -973,12 +973,16 @@ int QNativeSocketEnginePrivate::nativeSelect(int timeout, bool checkRead, bool c
ret = qt_socket_select(socketDescriptor + 1, &fdread, &fdwrite, &fdexec, timeout < 0 ? 0 : &tv);
bool selectForExec = FD_ISSET(socketDescriptor, &fdexec);
if(selectForExec) {
- qWarning("nativeSelect (checkRead %d, checkWrite %d, ret %d): Unexpected expectfds ready in fd %d",
- checkRead, checkWrite, ret, socketDescriptor);
- if(checkRead)
+ qWarning("nativeSelect (checkRead %d, checkWrite %d, ret %d, errno %d): Unexpected expectfds ready in fd %d",
+ checkRead, checkWrite, ret, errno, socketDescriptor);
+ if (checkRead)
FD_SET(socketDescriptor, &fdread);
- if(checkWrite)
+ if (checkWrite)
FD_SET(socketDescriptor, &fdwrite);
+
+ if ((ret == -1) && ( errno == ECONNREFUSED || errno == EPIPE ))
+ ret = 1;
+
}
#endif
if (ret != -1 || errno != EINTR) {