Skip to content

Commit

Permalink
fix last comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jepenven-silabs committed Nov 20, 2023
1 parent b317ed0 commit 1419503
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions src/app/icd/ICDManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ using namespace chip::app::Clusters;
using namespace chip::app::Clusters::IcdManagement;

static_assert(UINT8_MAX >= CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS,
"ICDManager::OpenExchangeContextCount cannot hold count for the max exchange count");
"ICDManager::mOpenExchangeContextCount cannot hold count for the max exchange count");

void ICDManager::Init(PersistentStorageDelegate * storage, FabricTable * fabricTable, Crypto::SymmetricKeystore * symmetricKeystore)
{
Expand Down Expand Up @@ -278,14 +278,14 @@ void ICDManager::OnKeepActiveRequest(KeepActiveFlags request)
{
// There can be multiple open exchange contexts at the same time.
// Keep track of the requests count.
this->OpenExchangeContextCount++;
this->mOpenExchangeContextCount++;
}

if (request.Has(KeepActiveFlag::kCheckInInProgress))
{
// There can be multiple check-in at the same time.
// Keep track of the requests count.
this->CheckInRequestCount++;
this->mCheckInRequestCount++;
}

this->SetKeepActiveModeRequirements(request, true /* state */);
Expand All @@ -301,16 +301,16 @@ void ICDManager::OnActiveRequestWithdrawal(KeepActiveFlags request)
{
// There can be multiple open exchange contexts at the same time.
// Keep track of the requests count.
if (this->OpenExchangeContextCount > 0)
if (this->mOpenExchangeContextCount > 0)
{
this->OpenExchangeContextCount--;
this->mOpenExchangeContextCount--;
}
else
{
ChipLogError(DeviceLayer, "The ICD Manager did not account for ExchangeContext closure");
}

if (this->OpenExchangeContextCount == 0)
if (this->mOpenExchangeContextCount == 0)
{
this->SetKeepActiveModeRequirements(KeepActiveFlag::kExchangeContextOpen, false /* state */);
}
Expand All @@ -320,16 +320,16 @@ void ICDManager::OnActiveRequestWithdrawal(KeepActiveFlags request)
{
// There can be multiple open exchange contexts at the same time.
// Keep track of the requests count.
if (this->CheckInRequestCount > 0)
if (this->mCheckInRequestCount > 0)
{
this->CheckInRequestCount--;
this->mCheckInRequestCount--;
}
else
{
ChipLogError(DeviceLayer, "The ICD Manager did not account for Check-In Sender start");
}

if (this->CheckInRequestCount == 0)
if (this->mCheckInRequestCount == 0)
{
this->SetKeepActiveModeRequirements(KeepActiveFlag::kCheckInInProgress, false /* state */);
}
Expand Down
4 changes: 2 additions & 2 deletions src/app/icd/ICDManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ class ICDManager : public ICDListener
*/
static void OnTransitionToIdle(System::Layer * aLayer, void * appState);

uint8_t OpenExchangeContextCount;
uint8_t CheckInRequestCount;
uint8_t mOpenExchangeContextCount = 0;
uint8_t mCheckInRequestCount = 0;

private:
// SIT ICDs should have a SlowPollingThreshold shorter than or equal to 15s (spec 9.16.1.5)
Expand Down

0 comments on commit 1419503

Please sign in to comment.