summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrii Kalinich <AKalinich@luxoft.com>2021-01-12 20:12:03 -0500
committerLitvinenkoIra <ilytvynenko@luxoft.com>2021-01-21 10:04:20 +0200
commitdc3af681f0fa52c033deffcf916c79e243d57e8f (patch)
tree0b796ff9bd5e12bbeb181e223e9171edc386af2d
parente70cd8474defd581589bf46e0a33633bf746fba2 (diff)
downloadsdl_core-dc3af681f0fa52c033deffcf916c79e243d57e8f.tar.gz
Fix HMI request termination by error response
There was noticed that SDL does not terminate HMI request commands in case if HMI sends response in the error format. This was fixed.
-rw-r--r--src/components/application_manager/src/rpc_service_impl.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/components/application_manager/src/rpc_service_impl.cc b/src/components/application_manager/src/rpc_service_impl.cc
index 34a0bed7af..f0cd720e30 100644
--- a/src/components/application_manager/src/rpc_service_impl.cc
+++ b/src/components/application_manager/src/rpc_service_impl.cc
@@ -390,7 +390,10 @@ bool RPCServiceImpl::ManageHMICommand(const commands::MessageSharedPtr message,
if (command->Init()) {
command->Run();
- if (kResponse == message_type) {
+ if (helpers::Compare<int32_t, helpers::EQ, helpers::ONE>(
+ message_type, kResponse, kErrorResponse) &&
+ message->getElement(strings::params)
+ .keyExists(strings::correlation_id)) {
const uint32_t correlation_id =
(*(message.get()))[strings::params][strings::correlation_id].asUInt();
const int32_t function_id =