Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mkardous-silabs committed Apr 25, 2024
1 parent ba4fcc5 commit 54537d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/app/icd/server/ICDManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -668,12 +668,14 @@ CHIP_ERROR ICDManager::HandleEventTrigger(uint64_t eventTrigger)
case ICDTestEventTriggerEvent::kRemoveActiveModeReq:
SetKeepActiveModeRequirements(KeepActiveFlag::kTestEventTriggerActiveMode, false);
break;
#if CHIP_CONFIG_ENABLE_ICD_CIP
case ICDTestEventTriggerEvent::kInvalidateHalfCounterValues:
err = ICDConfigurationData::GetInstance().GetICDCounter().InvalidateHalfCheckInCouterValues();
break;
case ICDTestEventTriggerEvent::kInvalidateAllCounterValues:
err = ICDConfigurationData::GetInstance().GetICDCounter().InvalidateAllCheckInCounterValues();
break;
#endif // CHIP_CONFIG_ENABLE_ICD_CIP
default:
err = CHIP_ERROR_INVALID_ARGUMENT;
break;
Expand Down
1 change: 0 additions & 1 deletion src/protocols/secure_channel/CheckInCounter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ CHIP_ERROR CheckInCounter::InvalidateHalfCheckInCouterValues()
uint32_t currentCounterValue = GetValue();

// Double current counter value and update underlying counter storage. CheckInCounter is allowed to rollover.
// If current value is 0, set UINT32_MAX / 2 since multiplication will be 0
uint32_t newCounterValue = currentCounterValue + (UINT32_MAX / 2);
ReturnErrorOnFailure(SetValue(newCounterValue));

Expand Down

0 comments on commit 54537d2

Please sign in to comment.