Skip to content

Commit

Permalink
Removed redundant Store call in addNOC callback (#17173)
Browse files Browse the repository at this point in the history
  • Loading branch information
harsha-rajendran authored and pull[bot] committed Dec 12, 2023
1 parent dc1467d commit 2439432
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -628,9 +628,6 @@ bool emberAfOperationalCredentialsClusterAddNOCCallback(app::CommandHandler * co
err = Server::GetInstance().GetFabricTable().AddNewFabric(gFabricBeingCommissioned, &fabricIndex);
VerifyOrExit(err == CHIP_NO_ERROR, nocResponse = ConvertToNOCResponseStatus(err));

err = Server::GetInstance().GetFabricTable().Store(fabricIndex);
VerifyOrExit(err == CHIP_NO_ERROR, nocResponse = ConvertToNOCResponseStatus(err));

// The Fabric Index associated with the armed fail-safe context SHALL be updated to match the Fabric
// Index just allocated.
err = failSafeContext.SetAddNocCommandInvoked(fabricIndex);
Expand Down
1 change: 1 addition & 0 deletions src/credentials/FabricTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ class DLL_EXPORT FabricTable
* can release the memory associated with input parameter after the call is complete.
*
* If the call is successful, the assigned fabric index is returned as output parameter.
* The fabric information will also be persisted to storage.
*/
CHIP_ERROR AddNewFabric(FabricInfo & fabric, FabricIndex * assignedIndex);

Expand Down

0 comments on commit 2439432

Please sign in to comment.