From 239fd7f6b9ed70d2598c175ecb617ea304ca4db4 Mon Sep 17 00:00:00 2001 From: Marc Lepage Date: Tue, 7 Dec 2021 16:17:03 -0500 Subject: [PATCH] Fix iteration in ACL read Sentinel error is expected when iteration ends. --- .../clusters/access-control-server/access-control-server.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/clusters/access-control-server/access-control-server.cpp b/src/app/clusters/access-control-server/access-control-server.cpp index cfa148f2db7661..ed86013e3226a3 100644 --- a/src/app/clusters/access-control-server/access-control-server.cpp +++ b/src/app/clusters/access-control-server/access-control-server.cpp @@ -364,7 +364,8 @@ CHIP_ERROR AccessControlAttribute::ReadAcl(AttributeValueEncoder & aEncoder) { ReturnErrorOnFailure(encoder.Encode(codec)); } - return err; + ReturnErrorCodeIf(err != CHIP_NO_ERROR && err != CHIP_ERROR_SENTINEL, err); + return CHIP_NO_ERROR; }); }