summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Oleynik (GitHub) <aoleynik@luxoft.com>2017-11-15 16:31:00 +0200
committerAndriy Byzhynar <AByzhynar@luxoft.com>2018-01-18 12:03:51 +0200
commit1d2fa24c81b8910ef533fbedf777f627e220e10e (patch)
tree9ba4cc5bc13ccf08fc6c0fa41fe8b796a2feac21
parent0f7975968a2be51fa4da7be4cbb4da0ee1d637c7 (diff)
downloadsdl_core-1d2fa24c81b8910ef533fbedf777f627e220e10e.tar.gz
Fixes deletion of commands and submenus on failed resume
While adding data from AddCommand/AddSubMenun msg_params are added itself so we have directly address internal fields w/o accessing 'msg_params'
-rw-r--r--src/components/application_manager/src/message_helper/message_helper.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/application_manager/src/message_helper/message_helper.cc b/src/components/application_manager/src/message_helper/message_helper.cc
index e02291224a..34a35e5929 100644
--- a/src/components/application_manager/src/message_helper/message_helper.cc
+++ b/src/components/application_manager/src/message_helper/message_helper.cc
@@ -408,7 +408,7 @@ void MessageHelper::SendDeleteCommandRequest(smart_objects::SmartObject* cmd,
using namespace smart_objects;
SmartObject msg_params = SmartObject(smart_objects::SmartType_Map);
- msg_params[strings::cmd_id] = (*cmd)[strings::msg_params][strings::cmd_id];
+ msg_params[strings::cmd_id] = (*cmd)[strings::cmd_id];
msg_params[strings::app_id] = application->app_id();
if ((*cmd).keyExists(strings::menu_params)) {
@@ -452,7 +452,7 @@ void MessageHelper::SendDeleteSubmenuRequest(smart_objects::SmartObject* cmd,
SmartObject msg_params = SmartObject(smart_objects::SmartType_Map);
- msg_params[strings::menu_id] = (*cmd)[strings::msg_params][strings::menu_id];
+ msg_params[strings::menu_id] = (*cmd)[strings::menu_id];
msg_params[strings::app_id] = application->app_id();
SmartObjectSPtr message = CreateMessageForHMI(
@@ -476,7 +476,7 @@ void MessageHelper::SendDeleteSubmenuRequest(smart_objects::SmartObject* cmd,
continue;
}
- if ((*cmd)[strings::msg_params][strings::menu_id].asInt() ==
+ if ((*cmd)[strings::menu_id].asInt() ==
(*it->second)[strings::menu_params][hmi_request::parent_id].asInt()) {
SmartObject msg_params = SmartObject(smart_objects::SmartType_Map);
msg_params[strings::cmd_id] = (*it->second)[strings::cmd_id].asInt();