summaryrefslogtreecommitdiff
path: root/src/CommonAPI
diff options
context:
space:
mode:
authorJohannes Schanda <schanda@itestra.de>2013-05-15 15:29:44 +0200
committerJohannes Schanda <schanda@itestra.de>2013-05-15 15:29:44 +0200
commit6a4f7dcf25d93e334471be1ded752a5f7ba00fb5 (patch)
treee5d22ab881e44fbccb5570dbe449d8ced03a65ed /src/CommonAPI
parentddd0a62646366b1a366014e395ce21cda9879f56 (diff)
downloadgenivi-common-api-dbus-runtime-6a4f7dcf25d93e334471be1ded752a5f7ba00fb5.tar.gz
Fix test on object path registration
Diffstat (limited to 'src/CommonAPI')
-rw-r--r--src/CommonAPI/DBus/DBusObjectManager.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/CommonAPI/DBus/DBusObjectManager.cpp b/src/CommonAPI/DBus/DBusObjectManager.cpp
index fcfa9f8..3c3c122 100644
--- a/src/CommonAPI/DBus/DBusObjectManager.cpp
+++ b/src/CommonAPI/DBus/DBusObjectManager.cpp
@@ -20,10 +20,10 @@ namespace DBus {
DBusObjectManager::DBusObjectManager(const std::shared_ptr<DBusProxyConnection>& dbusConnection):
dbusConnection_(dbusConnection) {
- assert(!dbusConnection->isObjectPathMessageHandlerSet());
- dbusConnection->setObjectPathMessageHandler(
- std::bind(&DBusObjectManager::handleMessage, this, std::placeholders::_1));
-
+ if (!dbusConnection->isObjectPathMessageHandlerSet()) {
+ dbusConnection->setObjectPathMessageHandler(
+ std::bind(&DBusObjectManager::handleMessage, this, std::placeholders::_1));
+ }
dbusConnection->registerObjectPath("/");
}