diff options
author | Aleksandr Galiuzov (GutHub) <AGaliuzov@luxoft.com> | 2016-12-22 18:33:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-22 18:33:24 +0200 |
commit | 331c58c879e3767463b9c8c748079d753590ea15 (patch) | |
tree | d67d5389eff29d2e13b7bd43188b8a0d94ea9900 | |
parent | 105b69ce4f0931e3f0e982ded32cb4adf028bbc9 (diff) | |
download | sdl_core-hotfix/policy-sends-update-needed-status-twice.tar.gz |
SDL sends twice UPDATE_NEEDED for invalid PTUhotfix/policy-sends-update-needed-status-twice
In case when invalid PTU happened SDL notifies system two times with the same status.
It happens because because wrong method is using to trigger the new update.
`OnPTExchangeNeeded()` method has to be called only during `OnPolicyUpdate` notification
as it immediately notifies the system about current status.
In case of regular update `UpdateStatusManager` is care about system notifying so `PolicyHandler`
has to call ForcePTExchange directly to start retry
-rw-r--r-- | src/components/application_manager/src/policies/policy_handler.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/components/application_manager/src/policies/policy_handler.cc b/src/components/application_manager/src/policies/policy_handler.cc index b51d230435..f6d303a611 100644 --- a/src/components/application_manager/src/policies/policy_handler.cc +++ b/src/components/application_manager/src/policies/policy_handler.cc @@ -900,7 +900,7 @@ bool PolicyHandler::ReceiveMessageFromSDK(const std::string& file, correlation_id, vehicle_data_args, application_manager_); } else { LOG4CXX_WARN(logger_, "Exchange wasn't successful, trying another one."); - OnPTExchangeNeeded(); + policy_manager_->ForcePTExchange(); } return ret; } |