diff options
author | Aleksandar Sasha Babic <aleksandar.babic@nokia.com> | 2010-05-07 09:45:00 (GMT) |
---|---|---|
committer | Aleksandar Sasha Babic <aleksandar.babic@nokia.com> | 2010-05-07 09:54:41 (GMT) |
commit | 1e91d6b79cba488fa5c6f7d954de611903837f76 (patch) | |
tree | 021104a783362dea4c36f197059757465bde90e9 /src/corelib | |
parent | 35bf9b380df6c73c314fd1794a7ee3e583b22450 (diff) | |
download | Qt-1e91d6b79cba488fa5c6f7d954de611903837f76.zip Qt-1e91d6b79cba488fa5c6f7d954de611903837f76.tar.gz Qt-1e91d6b79cba488fa5c6f7d954de611903837f76.tar.bz2 |
Making network reconnect happen after teardown.
When the network connection teardown happens we get notification on
except FD. As advised from Open C team we will use setdefaultif(0)
to kill all existing sockets and restart default IAP.
Task-number: QT-3284
Reviewed-by: Janne Anttila
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_symbian.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp index c85d1be..dea2f44 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,15 @@ 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 + ::setdefaultif(0); toRemove.append(i.key()); TRequestStatus *status = i.value(); QEventDispatcherSymbian::RequestComplete(d->threadData->symbian_thread_handle, status, KErrNone); |