summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
diff options
context:
space:
mode:
authorAleksandar Sasha Babic <aleksandar.babic@nokia.com>2009-05-18 11:03:41 (GMT)
committerAleksandar Sasha Babic <aleksandar.babic@nokia.com>2009-05-18 11:03:41 (GMT)
commitda69f361e9f4166095fc874e42dc97b163c5b57b (patch)
tree540efb7cfde1d53e78c352fd259cd83e8abf6ebb /src/corelib/kernel
parentdbcb4c6a2afb2aa288ac9a055850a52526dfe2c7 (diff)
downloadQt-da69f361e9f4166095fc874e42dc97b163c5b57b.zip
Qt-da69f361e9f4166095fc874e42dc97b163c5b57b.tar.gz
Qt-da69f361e9f4166095fc874e42dc97b163c5b57b.tar.bz2
Due to some Symbian/Open C specifics when we get error
after select(...) returns, we investigate socket by socket to detect on which the error occured. Therefore we have to force checking the status when socket descriptor is set in exception fd_set. Therefore, we have to force using
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r--src/corelib/kernel/qeventdispatcher_symbian.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp
index 3282b7c..2f38a95 100644
--- a/src/corelib/kernel/qeventdispatcher_symbian.cpp
+++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp
@@ -299,6 +299,9 @@ void QSelectThread::run()
// ones that return -1 in select
// after loop update notifiers for all of them
+ // as we dont have "exception" notifier type
+ // we should force monitoring fd_set of this
+ // type as well
// clean @ start
FD_ZERO(&readfds);
@@ -311,6 +314,11 @@ void QSelectThread::run()
fd_set onefds;
FD_ZERO(&onefds);
FD_SET(i.key()->socket(), &onefds);
+
+ fd_set excfds;
+ FD_ZERO(&excfds);
+ FD_SET(i.key()->socket(), &excfds);
+
maxfd = i.key()->socket() + 1;
struct timeval timeout;
@@ -320,14 +328,11 @@ void QSelectThread::run()
ret = 0;
if(i.key()->type() == QSocketNotifier::Read) {
- ret = ::select(maxfd, &onefds, 0, 0, &timeout);
+ ret = ::select(maxfd, &onefds, 0, &excfds, &timeout);
if(ret != 0) FD_SET(i.key()->socket(), &readfds);
} else if(i.key()->type() == QSocketNotifier::Write) {
- ret = ::select(maxfd, 0, &onefds, 0, &timeout);
+ ret = ::select(maxfd, 0, &onefds, &excfds, &timeout);
if(ret != 0) FD_SET(i.key()->socket(), &writefds);
- } else { // must be exception fds then
- ret = ::select(maxfd, 0, 0, &onefds, &timeout);
- if(ret != 0) FD_SET(i.key()->socket(), &exceptionfds);
}
} // end for