diff options
author | Alexander Kutsan (GitHub) <akutsan@luxoft.com> | 2017-01-11 12:34:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-11 12:34:30 +0200 |
commit | 7063ed619c92d795a46f221fc9935a2249e65bf2 (patch) | |
tree | 1a6ce9e81a47616e065b412964d7f1292dae8198 | |
parent | e9676760f4dfb1fc804d0e4e6eb4da70805ecf2c (diff) | |
parent | 09b37dd3022f6e3bf12f323f14bd5c18f48caaf8 (diff) | |
download | sdl_core-7063ed619c92d795a46f221fc9935a2249e65bf2.tar.gz |
Merge pull request #1151 from dcherniev/fix/correct_respond_params_for_unsubscribe_vehicle_data
Correct response params in UnSubscribeVehicleData
-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; } |