diff --git a/src/app/FailSafeContext.h b/src/app/FailSafeContext.h index af177bd2a8d5fc..065086ba9462f7 100644 --- a/src/app/FailSafeContext.h +++ b/src/app/FailSafeContext.h @@ -152,7 +152,6 @@ class FailSafeContext } void FailSafeTimerExpired(); - CHIP_ERROR CommitToStorage(); }; } // namespace app diff --git a/src/credentials/FabricTable.cpp b/src/credentials/FabricTable.cpp index 7e8ee4fd2e4cda..f06f343ec2587b 100644 --- a/src/credentials/FabricTable.cpp +++ b/src/credentials/FabricTable.cpp @@ -1466,7 +1466,7 @@ CHIP_ERROR FabricTable::StoreCommitMarker(const CommitMarker & commitMarker) const auto markerContextTLVLength = writer.GetLengthWritten(); VerifyOrReturnError(CanCastTo(markerContextTLVLength), CHIP_ERROR_BUFFER_TOO_SMALL); - return mStorage->SyncSetKeyValue(DefaultStorageKeyAllocator::FailSafeCommitMarkerKey().KeyName(), tlvBuf, + return mStorage->SyncSetKeyValue(DefaultStorageKeyAllocator::FabricTableCommitMarkerKey().KeyName(), tlvBuf, static_cast(markerContextTLVLength)); } @@ -1475,7 +1475,7 @@ CHIP_ERROR FabricTable::GetCommitMarker(CommitMarker & outCommitMarker) uint8_t tlvBuf[CommitMarkerContextTLVMaxSize()]; uint16_t tlvSize = sizeof(tlvBuf); ReturnErrorOnFailure( - mStorage->SyncGetKeyValue(DefaultStorageKeyAllocator::FailSafeCommitMarkerKey().KeyName(), tlvBuf, tlvSize)); + mStorage->SyncGetKeyValue(DefaultStorageKeyAllocator::FabricTableCommitMarkerKey().KeyName(), tlvBuf, tlvSize)); // If buffer was too small, we won't reach here. TLV::ContiguousBufferTLVReader reader; @@ -1499,7 +1499,7 @@ CHIP_ERROR FabricTable::GetCommitMarker(CommitMarker & outCommitMarker) void FabricTable::ClearCommitMarker() { - mStorage->SyncDeleteKeyValue(DefaultStorageKeyAllocator::FailSafeCommitMarkerKey().KeyName()); + mStorage->SyncDeleteKeyValue(DefaultStorageKeyAllocator::FabricTableCommitMarkerKey().KeyName()); } bool FabricTable::HasOperationalKeyForFabric(FabricIndex fabricIndex) const diff --git a/src/lib/support/DefaultStorageKeyAllocator.h b/src/lib/support/DefaultStorageKeyAllocator.h index b0de78d085e48d..72318002c38534 100644 --- a/src/lib/support/DefaultStorageKeyAllocator.h +++ b/src/lib/support/DefaultStorageKeyAllocator.h @@ -103,7 +103,7 @@ class DefaultStorageKeyAllocator static StorageKeyName FabricOpKey(FabricIndex fabric) { return StorageKeyName::Formatted("f/%x/o", fabric); } // Fail-safe handling - static StorageKeyName FailSafeCommitMarkerKey() { return StorageKeyName::FromConst("g/fs/c"); } + static StorageKeyName FabricTableCommitMarkerKey() { return StorageKeyName::FromConst("g/fs/c"); } static StorageKeyName FailSafeNetworkConfig() { return StorageKeyName::FromConst("g/fs/n"); } // LastKnownGoodTime