From ec63b3b2b379ab0fe62ef74c628605ff719bc682 Mon Sep 17 00:00:00 2001 From: Shobhit Adlakha Date: Fri, 27 Sep 2019 09:40:37 -0400 Subject: Fix/Set mandatory=false for optional response params (#3052) * Set mandatory=false for all response params(other than resultCode and success) in the MOBILE_API * Add moduleData key check in RCHelpers::RemoveRedundantGPSDataFromIVDataMsg --- .../rpc_plugins/rc_rpc_plugin/src/rc_helpers.cc | 3 +++ src/components/interfaces/MOBILE_API.xml | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_helpers.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_helpers.cc index 8cf20948cf..ca0edc90b1 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_helpers.cc +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_helpers.cc @@ -257,6 +257,9 @@ void RCHelpers::RemoveRedundantGPSDataFromIVDataMsg( using namespace application_manager::strings; LOG4CXX_AUTO_TRACE(logger_); + if (!msg_params.keyExists(kModuleData)) { + return; + } auto& module_data = msg_params[kModuleData]; if (!module_data.keyExists(kRadioControlData) || !module_data[kRadioControlData].keyExists(kSisData) || diff --git a/src/components/interfaces/MOBILE_API.xml b/src/components/interfaces/MOBILE_API.xml index 2307dada03..dd8cefe71a 100644 --- a/src/components/interfaces/MOBILE_API.xml +++ b/src/components/interfaces/MOBILE_API.xml @@ -6529,7 +6529,7 @@ Provides additional human readable info regarding the result. - + 2 byte ECU Header for DTC response (as defined in VHR_Layout_Specification_DTCs.pdf) @@ -6584,7 +6584,7 @@ Provides additional human readable info regarding the result. - + Array of bytes comprising CAN message result. @@ -7438,7 +7438,7 @@ - + See Result @@ -7540,7 +7540,7 @@ Used to set the values of one remote control module - + See Result @@ -7656,7 +7656,7 @@ - + See Result -- cgit v1.2.1