diff options
author | Daniele E. Domenichelli <daniele.domenichelli@gmail.com> | 2011-04-18 16:21:09 (GMT) |
---|---|---|
committer | Marius Storm-Olsen <marius.storm-olsen@nokia.com> | 2011-04-18 16:25:30 (GMT) |
commit | 9ac6b01ec67ead91143f7c722dbfab38f94dc8c3 (patch) | |
tree | 2a52c46e82545bd06be7ee6d3e7058d7964cd825 /src | |
parent | 7d4e64736774fb0d91f98978af91577461265815 (diff) | |
download | Qt-9ac6b01ec67ead91143f7c722dbfab38f94dc8c3.zip Qt-9ac6b01ec67ead91143f7c722dbfab38f94dc8c3.tar.gz Qt-9ac6b01ec67ead91143f7c722dbfab38f94dc8c3.tar.bz2 |
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>
Diffstat (limited to 'src')
-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 f78d7da..0d28c30 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); } } |