summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-07-10 08:48:11 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-07-10 08:48:11 (GMT)
commitcf907cb8ab5ecb95d964762c1cce586fa2207dff (patch)
tree2aca36ededeae065c2892e5edd8daf01ea03cb95 /src
parent4cf3730c65b28f3e895a1a4c8f7db509e11c71c0 (diff)
parent0efc71b7af2818f2f40438b2807efe361352f7a9 (diff)
downloadQt-cf907cb8ab5ecb95d964762c1cce586fa2207dff.zip
Qt-cf907cb8ab5ecb95d964762c1cce586fa2207dff.tar.gz
Qt-cf907cb8ab5ecb95d964762c1cce586fa2207dff.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: Linux runonphone - tell the user which driver to load Fix USB serial port detection of the Nokia N95 on linux Fix license headers on new files imported from Qt Creator Implement just in time debug feature for runonphone Merge tools/runonphone/symbianutils from qtcreator src/shared/symbianutils Add exception barrier to QCertificateRetriever::RunL() Set QThreads to be process critical automatically on Symbian OS
Diffstat (limited to 'src')
-rw-r--r--src/corelib/thread/qthread_unix.cpp8
-rw-r--r--src/network/ssl/qsslsocket_openssl.cpp11
-rw-r--r--src/network/ssl/qsslsocket_openssl_p.h1
3 files changed, 17 insertions, 3 deletions
diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp
index 6b34b5f..d193b2e 100644
--- a/src/corelib/thread/qthread_unix.cpp
+++ b/src/corelib/thread/qthread_unix.cpp
@@ -247,6 +247,14 @@ void *QThreadPrivate::start(void *arg)
data->symbian_thread_handle = RThread();
TThreadId threadId = data->symbian_thread_handle.Id();
data->symbian_thread_handle.Open(threadId);
+ // On symbian, threads other than the main thread are non critical by default
+ // This means a worker thread can crash without crashing the application - to
+ // use this feature, we would need to use RThread::Logon in the main thread
+ // to catch abnormal thread exit and emit the finished signal.
+ // For the sake of cross platform consistency, we set the thread as process critical
+ // - advanced users who want the symbian behaviour can change the critical
+ // attribute of the thread again once the app gains control in run()
+ User::SetCritical(User::EProcessCritical);
#endif
pthread_once(&current_thread_data_once, create_current_thread_data_key);
diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
index d7088ee..1d794ae 100644
--- a/src/network/ssl/qsslsocket_openssl.cpp
+++ b/src/network/ssl/qsslsocket_openssl.cpp
@@ -199,7 +199,7 @@ QSslCipher QSslSocketBackendPrivate::QSslCipher_from_SSL_CIPHER(SSL_CIPHER *ciph
ciph.d->protocol = QSsl::SslV2;
else if (protoString == QLatin1String("TLSv1"))
ciph.d->protocol = QSsl::TlsV1;
-
+
if (descriptionList.at(2).startsWith(QLatin1String("Kx=")))
ciph.d->keyExchangeMethod = descriptionList.at(2).mid(3);
if (descriptionList.at(3).startsWith(QLatin1String("Au=")))
@@ -367,7 +367,7 @@ init_context:
// Set verification depth.
if (configuration.peerVerifyDepth != 0)
q_SSL_CTX_set_verify_depth(ctx, configuration.peerVerifyDepth);
-
+
// Create and initialize SSL session
if (!(ssl = q_SSL_new(ctx))) {
// ### Bad error code
@@ -616,6 +616,11 @@ void QCertificateRetriever::retrieveNextCertificate()
void QCertificateRetriever::RunL()
{
+ QT_TRYCATCH_LEAVING(run());
+}
+
+void QCertificateRetriever::run()
+{
switch (state) {
case Initializing:
list();
@@ -818,7 +823,7 @@ void QSslSocketBackendPrivate::transmit()
bool transmitting;
do {
transmitting = false;
-
+
// If the connection is secure, we can transfer data from the write
// buffer (in plain text) to the write BIO through SSL_write.
if (connectionEncrypted && !writeBuffer.isEmpty()) {
diff --git a/src/network/ssl/qsslsocket_openssl_p.h b/src/network/ssl/qsslsocket_openssl_p.h
index e41320d..987dfae 100644
--- a/src/network/ssl/qsslsocket_openssl_p.h
+++ b/src/network/ssl/qsslsocket_openssl_p.h
@@ -161,6 +161,7 @@ private:
virtual void RunL();
virtual void DoCancel();
+ void run();
void list();
void retrieveNextCertificate();