aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarja Hassinen <ext-marja.2.hassinen@nokia.com>2010-02-17 16:24:26 +0200
committerMarja Hassinen <ext-marja.2.hassinen@nokia.com>2010-02-17 16:24:26 +0200
commit5bd8cf84a13a089eab45e6de76da323ed7060669 (patch)
treea8c13ed78b1116f8cbe7bfddd2a8fa68c891e950
parent8b234ef77738fee5e6536c1a981808257fbbc71e (diff)
libcontextprovider, fix for dbusservicewatching.serviceownerdeprecated
Also stop watching a client when it has exited. The client will resubscribe if needed, then we'll start listening again.
-rw-r--r--libcontextprovider/src/propertyadaptor.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/libcontextprovider/src/propertyadaptor.cpp b/libcontextprovider/src/propertyadaptor.cpp
index bbb2b7d6..f82b3055 100644
--- a/libcontextprovider/src/propertyadaptor.cpp
+++ b/libcontextprovider/src/propertyadaptor.cpp
@@ -133,6 +133,9 @@ void PropertyAdaptor::onClientExited(const QString& busName)
if (clientServiceNames.remove(busName) && clientServiceNames.size() == 0) {
propertyPrivate->setUnsubscribed();
}
+ // The client is expected to re-subscribe if it comes back. Then we will
+ // start watching it again.
+ serviceWatcher.removeWatchedService(busName);
}
/// Object path where the corresponding PropertyPrivate object should