Skip to content

Commit

Permalink
[ICD]Post the MsgSentEvent on retransmits also (#27968)
Browse files Browse the repository at this point in the history
* Post the MsgSentEvent on retransmits also

* Add a comment explaining why we set ExpectedResponse to false
  • Loading branch information
jmartinez-silabs authored and pull[bot] committed Oct 5, 2023
1 parent 608343c commit 1700338
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
13 changes: 13 additions & 0 deletions src/messaging/ReliableMessageMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,19 @@ CHIP_ERROR ReliableMessageMgr::SendFromRetransTable(RetransTableEntry * entry)

if (err == CHIP_NO_ERROR)
{
#if CONFIG_DEVICE_LAYER && CHIP_CONFIG_ENABLE_ICD_SERVER
DeviceLayer::ChipDeviceEvent event;
// Here always set ExpectResponse to false.
// The Initial message sent from the Exchange Context will have set ExpectResponse to the correct value.
// If we are expecting a Response, the ICD will already be in a state waiting for the response (or timeout).
event.Type = DeviceLayer::DeviceEventType::kChipMsgSentEvent;
event.MessageSent.ExpectResponse = false;
CHIP_ERROR status = DeviceLayer::PlatformMgr().PostEvent(&event);
if (status != CHIP_NO_ERROR)
{
ChipLogError(DeviceLayer, "Failed to post retransmit message sent event %" CHIP_ERROR_FORMAT, status.Format());
}
#endif // CONFIG_DEVICE_LAYER
#if CHIP_CONFIG_RESOLVE_PEER_ON_FIRST_TRANSMIT_FAILURE
const ExchangeManager * exchangeMgr = entry->ec->GetExchangeMgr();
// TODO: investigate why in ReliableMessageMgr::CheckResendApplicationMessageWithPeerExchange unit test released exchange
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2000,10 +2000,6 @@ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread<ImplClass>::_SetPollingInter
ChipLogError(DeviceLayer, "Failed to set SED interval to %" PRId32 "ms. Defaulting to %" PRId32 "ms",
pollingInterval.count(), curIntervalMS);
}
else
{
ChipLogProgress(DeviceLayer, "OpenThread SED interval is %" PRId32 "ms", curIntervalMS);
}

return err;
}
Expand Down

0 comments on commit 1700338

Please sign in to comment.