diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2010-05-19 13:31:25 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2010-05-19 13:31:25 (GMT) |
commit | 78dcac759d500c1744751955623b1d0babcd37a4 (patch) | |
tree | 59d7a2540c2fcffe0b274afbf85db9a1f53242f4 /src/corelib/kernel | |
parent | f1c79b3c90c1e14d8bee0228e3e416fa5337cf6e (diff) | |
parent | de0858687898f6e0e54cce3f986779c7aa1a350e (diff) | |
download | Qt-78dcac759d500c1744751955623b1d0babcd37a4.zip Qt-78dcac759d500c1744751955623b1d0babcd37a4.tar.gz Qt-78dcac759d500c1744751955623b1d0babcd37a4.tar.bz2 |
Merge remote branch 'origin/4.7' into HEAD
Conflicts:
src/corelib/tools/qlocale_symbian.cpp
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_symbian.cpp | 10 | ||||
-rw-r--r-- | src/corelib/kernel/qfunctions_wince.cpp | 10 |
2 files changed, 14 insertions, 6 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp index 687a6d9..33775d2 100644 --- a/src/corelib/kernel/qeventdispatcher_symbian.cpp +++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp @@ -47,6 +47,8 @@ #include <unistd.h> #include <errno.h> +#include <net/if.h> + QT_BEGIN_NAMESPACE #ifdef SYMBIAN_GRAPHICS_WSERV_QT_EFFECTS @@ -569,13 +571,17 @@ void QSelectThread::updateActivatedNotifiers(QSocketNotifier::Type type, fd_set * check if socket is in exception set * then signal RequestComplete for it */ - qWarning("exception on %d [will close the socket handle - hack]", i.key()->socket()); + qWarning("exception on %d [will do setdefaultif(0) - hack]", i.key()->socket()); // quick fix; there is a bug // when doing read on socket // errors not preoperly mapped // after offline-ing the device // on some devices we do get exception - ::close(i.key()->socket()); + // close all exiting sockets + // and reset default IAP + if(::setdefaultif(0) != KErrNone) // well we can't do much about it + qWarning("setdefaultif(0) failed"); + toRemove.append(i.key()); TRequestStatus *status = i.value(); QEventDispatcherSymbian::RequestComplete(d->threadData->symbian_thread_handle, status, KErrNone); diff --git a/src/corelib/kernel/qfunctions_wince.cpp b/src/corelib/kernel/qfunctions_wince.cpp index 8ad6126..e58feb3 100644 --- a/src/corelib/kernel/qfunctions_wince.cpp +++ b/src/corelib/kernel/qfunctions_wince.cpp @@ -352,16 +352,18 @@ void *qt_wince_bsearch(const void *key, size_t low = 0; size_t high = num - 1; while (low <= high) { - unsigned int mid = ((unsigned) (low + high)) >> 1; + size_t mid = (low + high) >> 1; int c = compare(key, (char*)base + mid * size); - if (c < 0) + if (c < 0) { + if (!mid) + break; high = mid - 1; - else if (c > 0) + } else if (c > 0) low = mid + 1; else return (char*) base + mid * size; } - return (NULL); + return 0; } void *lfind(const void* key, const void* base, size_t* elements, size_t size, |