diff options
author | Lutz Bichler <Lutz.Bichler@bmw.de> | 2020-10-27 10:00:57 +0100 |
---|---|---|
committer | Lutz Bichler <Lutz.Bichler@bmw.de> | 2020-10-27 10:00:57 +0100 |
commit | d1610ad0d6f1b6751964af41a0cc1599e2d7a955 (patch) | |
tree | 2144ae231a4ca372f497605d5b4779d2e11c2888 /include/CommonAPI/DBus/DBusProxyAsyncCallbackHandler.hpp | |
parent | 9f85f0f18d9ca436fb618769149ee02e78fd283b (diff) | |
download | genivi-common-api-dbus-runtime-master.tar.gz |
Diffstat (limited to 'include/CommonAPI/DBus/DBusProxyAsyncCallbackHandler.hpp')
-rw-r--r-- | include/CommonAPI/DBus/DBusProxyAsyncCallbackHandler.hpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/include/CommonAPI/DBus/DBusProxyAsyncCallbackHandler.hpp b/include/CommonAPI/DBus/DBusProxyAsyncCallbackHandler.hpp index 25b2ecd..f1c8ac7 100644 --- a/include/CommonAPI/DBus/DBusProxyAsyncCallbackHandler.hpp +++ b/include/CommonAPI/DBus/DBusProxyAsyncCallbackHandler.hpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2014-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/. @@ -119,7 +119,7 @@ class DBusProxyAsyncCallbackHandler : std::tuple<ArgTypes_...> args_; private: - template <int... ArgIndices_> + template <size_t... ArgIndices_> inline CallStatus handleDBusMessageReply( const CallStatus _dbusMessageCallStatus, const DBusMessage& _dbusMessage, @@ -132,10 +132,9 @@ class DBusProxyAsyncCallbackHandler : if (_dbusMessageCallStatus == CallStatus::SUCCESS) { DBusInputStream dbusInputStream(_dbusMessage); - if(DBusSerializableArguments<ArgTypes_...>::deserialize(dbusInputStream, + if(!DBusSerializableArguments<ArgTypes_...>::deserialize(dbusInputStream, std::get<ArgIndices_>(_argTuple)...)) { - } else { - callStatus = CallStatus::REMOTE_ERROR; + callStatus = CallStatus::SERIALIZATION_ERROR; } } @@ -195,7 +194,7 @@ public: private: - template <int... ArgIndices_> + template <size_t... ArgIndices_> inline CallStatus handleDBusMessageReply( const CallStatus _dbusMessageCallStatus, const DBusMessage& _dbusMessage, @@ -208,10 +207,9 @@ private: if (_dbusMessageCallStatus == CallStatus::SUCCESS) { DBusInputStream dbusInputStream(_dbusMessage); - if(DBusSerializableArguments<ArgTypes_...>::deserialize(dbusInputStream, + if (!DBusSerializableArguments<ArgTypes_...>::deserialize(dbusInputStream, std::get<ArgIndices_>(_argTuple)...)) { - } else { - callStatus = CallStatus::REMOTE_ERROR; + callStatus = CallStatus::SERIALIZATION_ERROR; } } else { if(_dbusMessage.isErrorType()) { |