Skip to content

Commit

Permalink
Reset mAddNocCommandHasBeenInvoked and mUpdateNocCommandHasBeenInvoke…
Browse files Browse the repository at this point in the history
…d in ArmFailSafe
  • Loading branch information
yufengwangca committed Mar 17, 2022
1 parent 6a5f06b commit d5c3a38
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 1 addition & 5 deletions src/include/platform/FailSafeContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,7 @@ class FailSafeContext
mFabricIndex = nocFabricIndex;
}

inline FabricIndex GetFabricIndex()
{
VerifyOrDie(mFailSafeArmed);
return mFabricIndex;
}
inline FabricIndex GetFabricIndex() { return mFabricIndex; }

private:
// ===== Private members reserved for use by this class only.
Expand Down
6 changes: 4 additions & 2 deletions src/platform/FailSafeContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ void FailSafeContext::CommissioningFailedTimerComplete()

CHIP_ERROR FailSafeContext::ArmFailSafe(FabricIndex accessingFabricIndex, System::Clock::Timeout expiryLength)
{
mFailSafeArmed = true;
mFabricIndex = accessingFabricIndex;
mFailSafeArmed = true;
mAddNocCommandHasBeenInvoked = false;
mUpdateNocCommandHasBeenInvoked = false;
mFabricIndex = accessingFabricIndex;
DeviceLayer::SystemLayer().StartTimer(expiryLength, HandleArmFailSafe, this);
return CHIP_NO_ERROR;
}
Expand Down

0 comments on commit d5c3a38

Please sign in to comment.