diff options
author | Alexander Kutsan (GitHub) <akutsan@luxoft.com> | 2017-07-24 18:14:24 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-24 18:14:24 +0300 |
commit | 04c3cf4aa06858b87a5e40de7ae2c3752c76704e (patch) | |
tree | 350a153f789317b119484e9a3f394837530a63e5 | |
parent | 2de054a7b1b412db061ae5bb6f0018708cecc393 (diff) | |
parent | 8d11e57bc76294b3fbafe18305b742954fb2d944 (diff) | |
download | sdl_core-04c3cf4aa06858b87a5e40de7ae2c3752c76704e.tar.gz |
Merge pull request #167 from LuxoftAKutsan/fix/set_interiour_vehicle_data_module_type_extraction
Fix extracting module type from mobile message in SetInteriorVehicleData
-rw-r--r-- | src/components/can_cooperation/src/commands/set_interior_vehicle_data_request.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/components/can_cooperation/src/commands/set_interior_vehicle_data_request.cc b/src/components/can_cooperation/src/commands/set_interior_vehicle_data_request.cc index 7524e99bf2..15816cd91e 100644 --- a/src/components/can_cooperation/src/commands/set_interior_vehicle_data_request.cc +++ b/src/components/can_cooperation/src/commands/set_interior_vehicle_data_request.cc @@ -111,9 +111,10 @@ void SetInteriorVehicleDataRequest::OnEvent( std::string SetInteriorVehicleDataRequest::ModuleType( const Json::Value& message) { - return message.get(message_params::kModuleType, "").asString(); + const Json::Value& module_data = + message.get(message_params::kModuleData, Json::Value(Json::objectValue)); + return module_data.get(message_params::kModuleType, "").asString(); } - std::vector<std::string> SetInteriorVehicleDataRequest::ControlData( const Json::Value& message) { Json::Value data = |