diff options
-rw-r--r-- | src/plugins/bearer/icd/qnetworksession_impl.cpp | 6 | ||||
-rw-r--r-- | src/plugins/bearer/icd/qnetworksession_impl.h | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/plugins/bearer/icd/qnetworksession_impl.cpp b/src/plugins/bearer/icd/qnetworksession_impl.cpp index 8013d30..787cc55 100644 --- a/src/plugins/bearer/icd/qnetworksession_impl.cpp +++ b/src/plugins/bearer/icd/qnetworksession_impl.cpp @@ -881,7 +881,6 @@ void QNetworkSessionPrivateImpl::close() } else if (isOpen) { if ((activeConfig.state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) { // We will not wait any disconnect from icd as it might never come - Maemo::Icd icd; #ifdef BEARER_MANAGEMENT_DEBUG qDebug() << "closing session" << publicConfig.identifier(); #endif @@ -894,7 +893,7 @@ void QNetworkSessionPrivateImpl::close() opened = false; isOpen = false; - icd.disconnect(ICD_CONNECTION_FLAG_APPLICATION_EVENT); + m_dbusInterface->call(ICD_DBUS_API_DISCONNECT_REQ, ICD_CONNECTION_FLAG_APPLICATION_EVENT); startTime = QDateTime(); } else { opened = false; @@ -915,7 +914,6 @@ void QNetworkSessionPrivateImpl::stop() emit QNetworkSessionPrivate::error(lastError); } else { if ((activeConfig.state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) { - Maemo::Icd icd; #ifdef BEARER_MANAGEMENT_DEBUG qDebug() << "stopping session" << publicConfig.identifier(); #endif @@ -928,7 +926,7 @@ void QNetworkSessionPrivateImpl::stop() opened = false; isOpen = false; - icd.disconnect(ICD_CONNECTION_FLAG_APPLICATION_EVENT); + m_dbusInterface->call(ICD_DBUS_API_DISCONNECT_REQ, ICD_CONNECTION_FLAG_APPLICATION_EVENT); startTime = QDateTime(); } else { opened = false; diff --git a/src/plugins/bearer/icd/qnetworksession_impl.h b/src/plugins/bearer/icd/qnetworksession_impl.h index 390e508..a879971 100644 --- a/src/plugins/bearer/icd/qnetworksession_impl.h +++ b/src/plugins/bearer/icd/qnetworksession_impl.h @@ -58,6 +58,7 @@ #include <QtCore/qdatetime.h> #include <QtCore/qtimer.h> +#include <QtCore/quuid.h> #include <QtDBus/qdbusconnection.h> #include <QtDBus/qdbusinterface.h> @@ -98,7 +99,9 @@ public: m_stopTimer.setSingleShot(true); connect(&m_stopTimer, SIGNAL(timeout()), this, SLOT(finishStopBySendingClosedSignal())); - QDBusConnection systemBus = QDBusConnection::systemBus(); + QDBusConnection systemBus = QDBusConnection::connectToBus( + QDBusConnection::SystemBus, + QUuid::createUuid().toString()); m_dbusInterface = new QDBusInterface(ICD_DBUS_API_INTERFACE, ICD_DBUS_API_PATH, |