Skip to content

Commit 494a8a4

Browse files
AKalinich-LuxoftiCollin
authored andcommitted
Fix sending of OnServiceUpdate on service NACK (#3095)
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.
1 parent 59157f0 commit 494a8a4

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/components/protocol_handler/src/protocol_handler_impl.cc

+8-1
Original file line numberDiff line numberDiff line change
@@ -1816,8 +1816,15 @@ void ProtocolHandlerImpl::NotifySessionStarted(
18161816
LOG4CXX_WARN(logger_,
18171817
"Refused by session_observer to create service "
18181818
<< static_cast<int32_t>(service_type) << " type.");
1819+
const auto session_id = packet->session_id();
1820+
const auto connection_key =
1821+
session_observer_.KeyFromPair(context.connection_id_, session_id);
1822+
service_status_update_handler_->OnServiceUpdate(
1823+
connection_key,
1824+
context.service_type_,
1825+
ServiceStatus::SERVICE_START_FAILED);
18191826
SendStartSessionNAck(context.connection_id_,
1820-
packet->session_id(),
1827+
session_id,
18211828
protocol_version,
18221829
packet->service_type(),
18231830
rejected_params);

0 commit comments

Comments
 (0)