Skip to content

Commit

Permalink
Skip calling OnFabricRetrievedFromStorage when the fabric is already …
Browse files Browse the repository at this point in the history
…initialized
  • Loading branch information
kghost committed Mar 24, 2022
1 parent 07fc8cd commit 025e0bf
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/credentials/FabricTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -618,15 +618,15 @@ CHIP_ERROR FabricTable::LoadFromStorage(FabricInfo * fabric)
if (!fabric->IsInitialized())
{
ReturnErrorOnFailure(fabric->LoadFromStorage(mStorage));
}

FabricTableDelegate * delegate = mDelegate;
while (delegate)
{
ChipLogProgress(Discovery, "Fabric (%d) loaded from storage. Calling OnFabricRetrievedFromStorage",
fabric->GetFabricIndex());
delegate->OnFabricRetrievedFromStorage(fabric);
delegate = delegate->mNext;
FabricTableDelegate * delegate = mDelegate;
while (delegate)
{
ChipLogProgress(Discovery, "Fabric (%d) loaded from storage. Calling OnFabricRetrievedFromStorage",
fabric->GetFabricIndex());
delegate->OnFabricRetrievedFromStorage(fabric);
delegate = delegate->mNext;
}
}
return CHIP_NO_ERROR;
}
Expand Down

0 comments on commit 025e0bf

Please sign in to comment.