Skip to content

Commit

Permalink
Fix write ACL attribute
Browse files Browse the repository at this point in the history
Broken because too many outstanding iterators at a time. Simple fix.
  • Loading branch information
mlepage-google authored and bzbarsky-apple committed Feb 2, 2022
1 parent 15ef474 commit 29bd9b4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/app/clusters/access-control-server/access-control-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -447,12 +447,14 @@ CHIP_ERROR AccessControlAttribute::WriteAcl(AttributeValueDecoder & aDecoder)
size_t newCount;
size_t maxCount;

AccessControl::EntryIterator it;
AccessControl::Entry entry;
ReturnErrorOnFailure(GetAccessControl().Entries(it, &accessingFabricIndex));
while (it.Next(entry) == CHIP_NO_ERROR)
{
oldCount++;
AccessControl::EntryIterator it;
AccessControl::Entry entry;
ReturnErrorOnFailure(GetAccessControl().Entries(it, &accessingFabricIndex));
while (it.Next(entry) == CHIP_NO_ERROR)
{
oldCount++;
}
}

ReturnErrorOnFailure(GetAccessControl().GetEntryCount(allCount));
Expand Down

0 comments on commit 29bd9b4

Please sign in to comment.