diff options
author | dcherniev <dcherniev@github.com> | 2017-01-04 16:47:49 +0200 |
---|---|---|
committer | dcherniev <dcherniev@github.com> | 2017-01-04 17:07:11 +0200 |
commit | 09b37dd3022f6e3bf12f323f14bd5c18f48caaf8 (patch) | |
tree | 69536c1f422e87b64c623bc2e41033986d59b578 /src | |
parent | 4ff12fe67f0ed15700fd030690276712ef23659d (diff) | |
download | sdl_core-09b37dd3022f6e3bf12f323f14bd5c18f48caaf8.tar.gz |
Correct response params in UnSubscribeVehicleData
Corrected response parameters, generated in case when vi interface is not available.
Related to: APPLINK-28727
Diffstat (limited to 'src')
-rw-r--r-- | src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_request.cc | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_request.cc b/src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_request.cc index 6902a9d659..9b0c0a673f 100644 --- a/src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_request.cc +++ b/src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_request.cc @@ -1,6 +1,6 @@ /* - Copyright (c) 2013, Ford Motor Company + Copyright (c) 2017, Ford Motor Company All rights reserved. Redistribution and use in source and binary forms, with or without @@ -201,16 +201,14 @@ void UnsubscribeVehicleDataRequest::Run() { } if (is_everything_already_unsubscribed) { - mobile_apis::Result::eType result_code = - vi_already_unsubscribed_by_this_app_.size() - ? mobile_apis::Result::IGNORED - : mobile_apis::Result::SUCCESS; - - const char* info = vi_already_unsubscribed_by_this_app_.size() - ? "Already subscribed on some provided VehicleData." - : NULL; - - SendResponse(true, result_code, info, &response_params); + if (!vi_already_unsubscribed_by_this_app_.empty()) { + SendResponse(false, + mobile_apis::Result::IGNORED, + "Some provided VehicleData was not subscribed.", + &response_params); + } else { + SendResponse(true, mobile_apis::Result::SUCCESS, NULL, &response_params); + } return; } |