Skip to content

Commit

Permalink
Fix configuration
Browse files Browse the repository at this point in the history
Was added at last minute, missed this spot.
  • Loading branch information
mlepage-google committed Nov 8, 2021
1 parent 4008c6b commit ba57c95
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/access/examples/ExampleAccessControlDelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ using Entry = chip::Access::AccessControl::Entry;
using EntryIterator = chip::Access::AccessControl::EntryIterator;
using Target = Entry::Target;

constexpr int kNumberOfFabrics = 4; // TODO: get from config
constexpr int kEntriesPerFabric = CHIP_CONFIG_EXAMPLE_ACCESS_CONTROL_MAX_ENTRIES_PER_FABRIC;
constexpr int kSubjectsPerEntry = CHIP_CONFIG_EXAMPLE_ACCESS_CONTROL_MAX_SUBJECTS_PER_ENTRY;
constexpr int kTargetsPerEntry = CHIP_CONFIG_EXAMPLE_ACCESS_CONTROL_MAX_TARGETS_PER_ENTRY;

// Pool sizes
constexpr int kEntryStoragePoolSize = CHIP_CONFIG_EXAMPLE_ACCESS_CONTROL_ENTRY_STORGAGE_POOL_SIZE;
constexpr int kEntryDelegatePoolSize = CHIP_CONFIG_EXAMPLE_ACCESS_CONTROL_ENTRY_DELEGATE_POOL_SIZE;
Expand Down Expand Up @@ -365,6 +360,8 @@ class EntryStorage
{
public:
// ACL support
static constexpr int kNumberOfFabrics = 4; // TODO: get from config
static constexpr int kEntriesPerFabric = CHIP_CONFIG_EXAMPLE_ACCESS_CONTROL_MAX_ENTRIES_PER_FABRIC;
static EntryStorage acl[kNumberOfFabrics * kEntriesPerFabric];

static EntryStorage * FindUnusedInAcl(size_t * index, const FabricIndex * fabricIndex)
Expand Down Expand Up @@ -512,8 +509,8 @@ class EntryStorage
}

public:
static constexpr int kMaxSubjects = 4;
static constexpr int kMaxTargets = 3;
static constexpr int kMaxSubjects = CHIP_CONFIG_EXAMPLE_ACCESS_CONTROL_MAX_SUBJECTS_PER_ENTRY;
static constexpr int kMaxTargets = CHIP_CONFIG_EXAMPLE_ACCESS_CONTROL_MAX_TARGETS_PER_ENTRY;

private:
bool mInUse;
Expand Down

0 comments on commit ba57c95

Please sign in to comment.