diff options
author | Shane Kearns <shane.kearns@accenture.com> | 2011-01-05 11:07:56 (GMT) |
---|---|---|
committer | Shane Kearns <shane.kearns@accenture.com> | 2011-01-14 16:38:22 (GMT) |
commit | ec4b73992eb7fb7254bb7a1524b8691ef2123b9f (patch) | |
tree | 2a1fc8f73d3de1cb0a10999fc6c9e7490dd4366d /src/network/access/qnetworkaccessmanager_p.h | |
parent | 8062464ce3f5fd6eb92f94d1fafa697385de72ce (diff) | |
download | Qt-ec4b73992eb7fb7254bb7a1524b8691ef2123b9f.zip Qt-ec4b73992eb7fb7254bb7a1524b8691ef2123b9f.tar.gz Qt-ec4b73992eb7fb7254bb7a1524b8691ef2123b9f.tar.bz2 |
Workaround crash when multiple QNetworkAccessManager instances are used
Instead of each QNetworkAccessManager owning a QNetworkSession, they now
share a QNetworkSession if they have the same QNetworkConfiguration.
QNetworkAccessManager now uses passive roaming instead of application
level roaming. The state change signal (entering connected state) is used
to indicate reconnection instead of being triggered when sending an ALR
accept().
This preserves the previous behaviour, as QNAM always accepted the
suggested access point from bearer mobility.
In the case of multithreaded applications, one QNetworkSession will be
created for each thread which uses QNetworkAccessManager, as QNetworkSession
is not thread safe.
Task-number: QT-4378
Reviewed-by: Markus Goetz
Reviewed-by: juhvu
Diffstat (limited to 'src/network/access/qnetworkaccessmanager_p.h')
-rw-r--r-- | src/network/access/qnetworkaccessmanager_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/access/qnetworkaccessmanager_p.h b/src/network/access/qnetworkaccessmanager_p.h index ee16c25..cf4d2f3 100644 --- a/src/network/access/qnetworkaccessmanager_p.h +++ b/src/network/access/qnetworkaccessmanager_p.h @@ -128,7 +128,7 @@ public: #endif #ifndef QT_NO_BEARERMANAGEMENT - QNetworkSession *networkSession; + QSharedPointer<QNetworkSession> networkSession; QString networkConfiguration; QNetworkAccessManager::NetworkAccessibility networkAccessible; bool online; |