summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qcore_unix.cpp
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2009-12-15 12:29:04 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2009-12-15 12:29:04 (GMT)
commitf6ebcf8eb829d9639daddfc7bfddafe4371be0ef (patch)
treeb63bd867ca0a259e8aea7e50561c31bd0d372ec7 /src/corelib/kernel/qcore_unix.cpp
parentda918327fdaaf45774c074d911882141cf77ea7e (diff)
parentd6cd6c59dae36b2890baae98f0bf94b23e5509da (diff)
downloadQt-f6ebcf8eb829d9639daddfc7bfddafe4371be0ef.zip
Qt-f6ebcf8eb829d9639daddfc7bfddafe4371be0ef.tar.gz
Qt-f6ebcf8eb829d9639daddfc7bfddafe4371be0ef.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6
Diffstat (limited to 'src/corelib/kernel/qcore_unix.cpp')
-rw-r--r--src/corelib/kernel/qcore_unix.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/corelib/kernel/qcore_unix.cpp b/src/corelib/kernel/qcore_unix.cpp
index 5885591..d0dc7be 100644
--- a/src/corelib/kernel/qcore_unix.cpp
+++ b/src/corelib/kernel/qcore_unix.cpp
@@ -129,7 +129,7 @@ static inline bool time_update(struct timeval *tv, const struct timeval &start,
// clock source is monotonic, so we can recalculate how much timeout is left
struct timeval now = qt_gettime();
*tv = timeout + start - now;
- return true;
+ return tv->tv_sec >= 0;
}
int qt_safe_select(int nfds, fd_set *fdread, fd_set *fdwrite, fd_set *fdexcept,
@@ -154,7 +154,8 @@ int qt_safe_select(int nfds, fd_set *fdread, fd_set *fdwrite, fd_set *fdexcept,
// recalculate the timeout
if (!time_update(&timeout, start, *orig_timeout)) {
- // clock reset, fake timeout error
+ // timeout during update
+ // or clock reset, fake timeout error
return 0;
}
}