Skip to content

Commit 9db03ee

Browse files
[ICD] Fix comment mistakes from post-merge reviews (project-chip#33225)
* Fix comment mistakes * Update src/app/icd/server/ICDManager.h Co-authored-by: Tennessee Carmel-Veilleux <tennessee.carmelveilleux@gmail.com> * Update src/app/icd/server/ICDManager.h Co-authored-by: Tennessee Carmel-Veilleux <tennessee.carmelveilleux@gmail.com> --------- Co-authored-by: Tennessee Carmel-Veilleux <tennessee.carmelveilleux@gmail.com>
1 parent dfe64ee commit 9db03ee

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

src/app/icd/server/ICDManager.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ CHIP_ERROR ICDManager::HandleEventTrigger(uint64_t eventTrigger)
670670
break;
671671
#if CHIP_CONFIG_ENABLE_ICD_CIP
672672
case ICDTestEventTriggerEvent::kInvalidateHalfCounterValues:
673-
err = ICDConfigurationData::GetInstance().GetICDCounter().InvalidateHalfCheckInCouterValues();
673+
err = ICDConfigurationData::GetInstance().GetICDCounter().InvalidateHalfCheckInCounterValues();
674674
break;
675675
case ICDTestEventTriggerEvent::kInvalidateAllCounterValues:
676676
err = ICDConfigurationData::GetInstance().GetICDCounter().InvalidateAllCheckInCounterValues();

src/app/icd/server/ICDManager.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class ICDManager : public ICDListener, public TestEventTriggerHandler
7474
};
7575

7676
/**
77-
* @brief This enum class represents to all ICDStateObserver callbacks available from the
77+
* @brief This enum class represents all ICDStateObserver callbacks available from the
7878
* mStateObserverPool for the ICDManager.
7979
*
8080
* EnterActiveMode, TransitionToIdle and EnterIdleMode will always be called as a trio in the same order.
@@ -85,12 +85,12 @@ class ICDManager : public ICDListener, public TestEventTriggerHandler
8585
* When this event is called, the ICD is still in ActiveMode.
8686
* If the ActiveMode timer is increased due to the TransitionToIdle event, the event will not be called a second time in
8787
* a given cycle.
88-
* OnEnterIdleMode will always the third when the ICD has transitioned to IdleMode.
88+
* OnEnterIdleMode will always the third event and indicates that the ICD has transitioned to IdleMode.
8989
*
9090
* The ICDModeChange event can occur independently from the EnterActiveMode, TransitionToIdle and EnterIdleMode.
91-
* It will typpically hapen at the ICDManager init when a client is already registered with the ICD before the
92-
* OnEnterIdleMode event or when a client send a register command after the OnEnterActiveMode event. Nothing prevents the
93-
* ICDModeChange event to happen multiple times per cycle or while the ICD is in IdleMode.
91+
* It will typically happen at the ICDManager init when a client is already registered with the ICD before the
92+
* OnEnterIdleMode event or when a client sends a register command after the OnEnterActiveMode event. Nothing prevents
93+
* the ICDModeChange event from happening multiple times per cycle or while the ICD is in IdleMode.
9494
*
9595
* See src/app/icd/server/ICDStateObserver.h for more information on the APIs each event triggers
9696
*/

src/protocols/secure_channel/CheckInCounter.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace chip {
2626
namespace Protocols {
2727
namespace SecureChannel {
2828

29-
CHIP_ERROR CheckInCounter::InvalidateHalfCheckInCouterValues()
29+
CHIP_ERROR CheckInCounter::InvalidateHalfCheckInCounterValues()
3030
{
3131
// Increases the current counter value by half of its maximum range and updates underlying counter storage.
3232
// CheckInCounter is allowed to roll over.

src/protocols/secure_channel/CheckInCounter.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class CheckInCounter : public PersistedCounter<uint32_t>
5353
*
5454
* @return CHIP_ERROR Any error returned by a write to persisted storage.
5555
*/
56-
CHIP_ERROR InvalidateHalfCheckInCouterValues();
56+
CHIP_ERROR InvalidateHalfCheckInCounterValues();
5757

5858
/**
5959
* @brief Invalidates all the Check-In counter values. After this function is called, the new Check-In counter value will be

src/protocols/secure_channel/tests/TestCheckInCounter.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ enum class CheckInCounterOperations : uint8_t
3737
* @brief Helper function that validates CheckInCounter value after an operation for configurable input values
3838
*
3939
* @param startValue Starting value of the Check-In counter
40-
* @param expectedValue Expected value after the InvalidateHalfCheckInCouterValues call
40+
* @param expectedValue Expected value after the InvalidateHalfCheckInCounterValues call
4141
*/
4242
void VerifyCheckInCounterValues(uint32_t startValue, uint32_t expectedValue, CheckInCounterOperations operation)
4343
{
@@ -60,7 +60,7 @@ void VerifyCheckInCounterValues(uint32_t startValue, uint32_t expectedValue, Che
6060
switch (operation)
6161
{
6262
case CheckInCounterOperations::kInvalidateHalf: {
63-
EXPECT_EQ(counter.InvalidateHalfCheckInCouterValues(), CHIP_NO_ERROR);
63+
EXPECT_EQ(counter.InvalidateHalfCheckInCounterValues(), CHIP_NO_ERROR);
6464
break;
6565
}
6666
case CheckInCounterOperations::kInvalidateAll: {

0 commit comments

Comments
 (0)