From 2439432e5c3065f9be369d47b3a51b081b029737 Mon Sep 17 00:00:00 2001 From: Harsha Rajendran Date: Thu, 7 Apr 2022 15:42:04 -0400 Subject: [PATCH] Removed redundant Store call in addNOC callback (#17173) --- .../operational-credentials-server.cpp | 3 --- src/credentials/FabricTable.h | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp index acea8e84b0cffe..76fb6b532cda36 100644 --- a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp +++ b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp @@ -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); diff --git a/src/credentials/FabricTable.h b/src/credentials/FabricTable.h index 6960c242bd3284..3f4d2fb79dfb8d 100644 --- a/src/credentials/FabricTable.h +++ b/src/credentials/FabricTable.h @@ -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);