Skip to content

Commit

Permalink
KVS Optimization: DEBUG IN PROGRESS.
Browse files Browse the repository at this point in the history
  • Loading branch information
rcasallas-silabs committed Aug 28, 2024
1 parent c0c33f6 commit 36eb382
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/credentials/GroupDataProviderV2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ CHIP_ERROR GroupDataProviderV2::SetGroupKeyAt(chip::FabricIndex fabric_index, si
GroupKey temp = in_map;
bool found = CHIP_NO_ERROR == keysets.Find(temp, found_index);
VerifyOrReturnError(!found || (found_index == index), CHIP_ERROR_DUPLICATE_KEY_ID);

VerifyOrReturnError(index < mMaxGroupsPerFabric, CHIP_ERROR_INVALID_ARGUMENT);
return keysets.Set(index, in_map);
}

Expand Down
2 changes: 1 addition & 1 deletion src/credentials/GroupDataProviderV2.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class GroupDataProviderV2 : public GroupDataProviderBase
};


static constexpr size_t kKeymapListMax = CHIP_CONFIG_MAX_GROUP_KEYS_PER_FABRIC * CHIP_CONFIG_MAX_FABRICS;
static constexpr size_t kKeymapListMax = CHIP_CONFIG_MAX_GROUPS_PER_FABRIC;
static constexpr size_t kKeymapSerializedMax = 2 + sizeof(GroupDataProvider::GroupKey); // GroupIdTag(1) + KeysetIdTag(1) + sizeof(GroupKey)

struct KeysetMap: public PersistentArray<kKeymapListMax, kKeymapSerializedMax, GroupDataProvider::GroupKey>
Expand Down

0 comments on commit 36eb382

Please sign in to comment.