diff options
author | Daniele E. Domenichelli <daniele.domenichelli@gmail.com> | 2011-04-18 11:21:09 -0500 |
---|---|---|
committer | Marius Storm-Olsen <marius.storm-olsen@nokia.com> | 2011-04-18 11:25:30 -0500 |
commit | 9ac6b01ec67ead91143f7c722dbfab38f94dc8c3 (patch) | |
tree | 2a52c46e82545bd06be7ee6d3e7058d7964cd825 | |
parent | 7d4e64736774fb0d91f98978af91577461265815 (diff) | |
download | qt4-tools-9ac6b01ec67ead91143f7c722dbfab38f94dc8c3.tar.gz |
QtDBus: Fix QDBusConnection::disconnectFromBus() for peer-to-peer connections
Merge-request: 2343
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
-rw-r--r-- | src/dbus/qdbusconnection.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/dbus/qdbusconnection.cpp b/src/dbus/qdbusconnection.cpp index f78d7da538..0d28c30acd 100644 --- a/src/dbus/qdbusconnection.cpp +++ b/src/dbus/qdbusconnection.cpp @@ -424,6 +424,9 @@ void QDBusConnection::disconnectFromBus(const QString &name) { if (_q_manager()) { QMutexLocker locker(&_q_manager()->mutex); + QDBusConnectionPrivate *d = _q_manager()->connection(name); + if(d && d->mode != QDBusConnectionPrivate::ClientMode) + return; _q_manager()->removeConnection(name); } } |