summaryrefslogtreecommitdiff
path: root/src/CommonAPI/DBus/DBusServiceRegistry.cpp
diff options
context:
space:
mode:
authorLutz Bichler <Lutz.Bichler@bmw.de>2020-10-27 10:00:57 +0100
committerLutz Bichler <Lutz.Bichler@bmw.de>2020-10-27 10:00:57 +0100
commitd1610ad0d6f1b6751964af41a0cc1599e2d7a955 (patch)
tree2144ae231a4ca372f497605d5b4779d2e11c2888 /src/CommonAPI/DBus/DBusServiceRegistry.cpp
parent9f85f0f18d9ca436fb618769149ee02e78fd283b (diff)
downloadgenivi-common-api-dbus-runtime-d1610ad0d6f1b6751964af41a0cc1599e2d7a955.tar.gz
capicxx-dbus-runtime 3.2.0HEAD3.2.0master
Diffstat (limited to 'src/CommonAPI/DBus/DBusServiceRegistry.cpp')
-rw-r--r--src/CommonAPI/DBus/DBusServiceRegistry.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/CommonAPI/DBus/DBusServiceRegistry.cpp b/src/CommonAPI/DBus/DBusServiceRegistry.cpp
index 2953d12..247aa2e 100644
--- a/src/CommonAPI/DBus/DBusServiceRegistry.cpp
+++ b/src/CommonAPI/DBus/DBusServiceRegistry.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2013-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+// Copyright (C) 2013-2020 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
@@ -23,7 +23,7 @@ std::mutex DBusServiceRegistry::registriesMutex_;
static CommonAPI::CallInfo serviceRegistryInfo(10000);
std::shared_ptr<DBusServiceRegistry>
-DBusServiceRegistry::get(std::shared_ptr<DBusProxyConnection> _connection, bool _insert) {
+DBusServiceRegistry::get(const std::shared_ptr<DBusProxyConnection> &_connection, bool _insert) {
std::unique_lock<std::mutex> itsGuard(registriesMutex_);
auto registries = getRegistryMap();
auto registryIterator = registries->find(_connection.get());
@@ -43,7 +43,7 @@ DBusServiceRegistry::get(std::shared_ptr<DBusProxyConnection> _connection, bool
}
void
-DBusServiceRegistry::remove(std::shared_ptr<DBusProxyConnection> _connection) {
+DBusServiceRegistry::remove(const std::shared_ptr<DBusProxyConnection> &_connection) {
std::lock_guard<std::mutex> itsGuard(registriesMutex_);
auto registries = getRegistryMap();
registries->erase(_connection.get());
@@ -759,6 +759,7 @@ bool DBusServiceRegistry::getManagedObjects(const std::string& dbusServiceName,
DBusInputStream input(reply);
if (!DBusSerializableArguments<DBusObjectManagerStub::DBusObjectPathAndInterfacesDict>::deserialize(
input, availableServiceInstances) || error)
+ COMMONAPI_ERROR("DBusServiceRegistry::", __func__, ": deserialization failed!");
return false;
}
return true;