Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
yufengwangca committed Oct 29, 2021
1 parent 49a8e8c commit 08495ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/app/reporting/Engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,14 +334,14 @@ void Engine::Run(System::Layer * aSystemLayer, void * apAppState)

CHIP_ERROR Engine::ScheduleRun()
{
if (mScheduleRunPending)
if (mRunScheduled)
{
return CHIP_NO_ERROR;
}

if (InteractionModelEngine::GetInstance()->GetExchangeManager() != nullptr)
{
mScheduleRunPending = true;
mRunScheduled = true;
return InteractionModelEngine::GetInstance()->GetExchangeManager()->GetSessionManager()->SystemLayer()->ScheduleWork(Run,
this);
}
Expand All @@ -358,7 +358,7 @@ void Engine::Run()
InteractionModelEngine * imEngine = InteractionModelEngine::GetInstance();
ReadHandler * readHandler = imEngine->mReadHandlers + mCurReadHandlerIdx;

mScheduleRunPending = false;
mRunScheduled = false;

while ((mNumReportsInFlight < CHIP_IM_MAX_REPORTS_IN_FLIGHT) && (numReadHandled < CHIP_IM_MAX_NUM_READ_HANDLER))
{
Expand Down
2 changes: 1 addition & 1 deletion src/app/reporting/Engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class Engine
* within the same execution context to avoid applying too much pressure on platforms that use small, fixed size event queues.
*
*/
bool mScheduleRunPending = false;
bool mRunScheduled = false;

/**
* The number of report date request in flight
Expand Down

0 comments on commit 08495ad

Please sign in to comment.