summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcollin <collin+i@collinmcqueen.com>2021-03-11 11:34:11 -0500
committercollin <collin+i@collinmcqueen.com>2021-03-11 11:34:11 -0500
commitd0fd96c024b6af6875822e7b4a5f8f5794a563a6 (patch)
tree5c9b81760ef1c0e67fbd5d17d3e8616439740cb4
parentfed2ae4a88afd6b4141b19fee9595b76d19a84c7 (diff)
downloadsdl_core-fix/resume_iserror.tar.gz
fix resumption IsResponseSuccessfulfix/resume_iserror
-rw-r--r--src/components/application_manager/src/resumption/resumption_data_processor_impl.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/components/application_manager/src/resumption/resumption_data_processor_impl.cc b/src/components/application_manager/src/resumption/resumption_data_processor_impl.cc
index 504db76a82..40634a307e 100644
--- a/src/components/application_manager/src/resumption/resumption_data_processor_impl.cc
+++ b/src/components/application_manager/src/resumption/resumption_data_processor_impl.cc
@@ -29,6 +29,7 @@
#include "application_manager/application_manager.h"
#include "application_manager/commands/command_impl.h"
+#include "application_manager/commands/command_request_impl.h"
#include "application_manager/display_capabilities_builder.h"
#include "application_manager/event_engine/event_observer.h"
#include "application_manager/message_helper.h"
@@ -151,6 +152,8 @@ void ResumptionDataProcessorImpl::ProcessResumptionStatus(
if (IsResponseSuccessful(response)) {
status.successful_requests.push_back(found_request);
} else {
+ SDL_LOG_DEBUG("Resumption request failed");
+ MessageHelper::PrintSmartObject(response);
status.error_requests.push_back(found_request);
}
@@ -977,7 +980,12 @@ void ResumptionDataProcessorImpl::DeletePluginsSubscriptions(
}
bool IsResponseSuccessful(const smart_objects::SmartObject& response) {
- return !response[strings::params].keyExists(strings::error_msg);
+ auto result_code = static_cast<hmi_apis::Common_Result::eType>(
+ response[strings::params][application_manager::hmi_response::code]
+ .asInt());
+
+ return commands::CommandRequestImpl::IsHMIResultSuccess(result_code) ||
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE == result_code;
}
void ResumptionDataProcessorImpl::CheckVehicleDataResponse(