diff options
author | Andrii Kalinich <AKalinich@luxoft.com> | 2019-10-21 19:14:22 -0400 |
---|---|---|
committer | Andrii Kalinich <AKalinich@luxoft.com> | 2019-10-21 19:14:22 -0400 |
commit | 472f2b35d63b6a3482d7833c0ca96d504b8a03f1 (patch) | |
tree | 3efb31abf64ee06a001fcecd5a0f924b88604249 | |
parent | 518df4697965ba6481932af3a9f77b1bd49487f0 (diff) | |
download | sdl_core-fix/fix_on_service_update_on_nack_by_observer.tar.gz |
Fix sending of OnServiceUpdate on service NACKfix/fix_on_service_update_on_nack_by_observer
There was found one corner case when SDL does
not change the internal status when service
start was refused due to current HMI level of
application. Was added missing check to set
status properly and send expected notification.
-rw-r--r-- | src/components/protocol_handler/src/protocol_handler_impl.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/components/protocol_handler/src/protocol_handler_impl.cc b/src/components/protocol_handler/src/protocol_handler_impl.cc index 61b9afd7bc..3b216c273c 100644 --- a/src/components/protocol_handler/src/protocol_handler_impl.cc +++ b/src/components/protocol_handler/src/protocol_handler_impl.cc @@ -1816,8 +1816,15 @@ void ProtocolHandlerImpl::NotifySessionStarted( LOG4CXX_WARN(logger_, "Refused by session_observer to create service " << static_cast<int32_t>(service_type) << " type."); + const auto session_id = packet->session_id(); + const auto connection_key = + session_observer_.KeyFromPair(context.connection_id_, session_id); + service_status_update_handler_->OnServiceUpdate( + connection_key, + context.service_type_, + ServiceStatus::SERVICE_START_FAILED); SendStartSessionNAck(context.connection_id_, - packet->session_id(), + session_id, protocol_version, packet->service_type(), rejected_params); |