Skip to content

Commit

Permalink
Fix runtime and compile time errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tehampson committed Jun 8, 2022
1 parent 211a2a4 commit a07d4c9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/clusters/bindings/BindingManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace {

class BindingFabricTableDelegate : public chip::FabricTable::Delegate
{
void OnFabricHasChanged(FabricTable & fabricTable, FabricIndex fabricIndex, bool fabricDeleted) override
void OnFabricHasChanged(chip::FabricTable & fabricTable, chip::FabricIndex fabricIndex, bool fabricDeleted) override
{
// TODO We likely want to do the same thing regardless of fabricDeleted. For
// now bailing out early when only update.
Expand Down
9 changes: 8 additions & 1 deletion src/app/clusters/door-lock-server/door-lock-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,15 @@ DoorLockServer DoorLockServer::instance;

class DoorLockClusterFabricDelegate : public chip::FabricTable::Delegate
{
void OnFabricDeletedFromStorage(FabricTable & fabricTable, FabricIndex fabricIndex) override
void OnFabricHasChanged(FabricTable & fabricTable, FabricIndex fabricIndex, bool fabricDeleted) override
{
// TODO We likely want to do the same thing regardless of fabricDeleted. For
// now bailing out early when only update.
if (!fabricDeleted)
{
return;
}

for (auto endpointId : EnabledEndpointsWithServerCluster(chip::app::Clusters::DoorLock::Id))
{
if (!DoorLockServer::Instance().OnFabricRemoved(endpointId, fabricIndex))
Expand Down
5 changes: 4 additions & 1 deletion src/protocols/secure_channel/CASESession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,10 @@ void CASESession::Clear()
mState = State::kInitialized;
Crypto::ClearSecretData(mIPK);

mFabricsTable->RemoveFabricDelegate(&mFabricDelegate);
if (mFabricsTable)
{
mFabricsTable->RemoveFabricDelegate(&mFabricDelegate);
}

mLocalNodeId = kUndefinedNodeId;
mPeerNodeId = kUndefinedNodeId;
Expand Down

0 comments on commit a07d4c9

Please sign in to comment.