Skip to content

Commit

Permalink
Fix CASE session break for not fully implemented timers (FreeRTOS) (#…
Browse files Browse the repository at this point in the history
…13540)

Error catch on timer broadened to also allow NOT_SYNCED or other errors.
  • Loading branch information
tima-q authored and pull[bot] committed Nov 30, 2023
1 parent b489f77 commit 1156675
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/protocols/secure_channel/CASESession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1317,15 +1317,15 @@ CHIP_ERROR CASESession::SetEffectiveTime()
{
System::Clock::Milliseconds64 currentTimeMS;
CHIP_ERROR err = System::SystemClock().GetClock_RealTimeMS(currentTimeMS);
if (err == CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE)

if (err != CHIP_NO_ERROR)
{
ChipLogError(
SecureChannel,
"The device does not support GetClock_RealTimeMS() API. This will eventually result in CASE session setup failures.");
// TODO: Remove use of hardcoded time during CASE setup
return GetHardcodedTime();
}
ReturnErrorOnFailure(err);

System::Clock::Seconds32 currentTime = std::chrono::duration_cast<System::Clock::Seconds32>(currentTimeMS);
VerifyOrReturnError(UnixEpochToChipEpochTime(currentTime.count(), mValidContext.mEffectiveTime), CHIP_ERROR_INVALID_TIME);
Expand Down

0 comments on commit 1156675

Please sign in to comment.