From e5e1a80a09648c60c039aa1ae616f9ab2b8d4c4b Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 14 Feb 2022 18:16:57 -0500 Subject: [PATCH] Also assert in MatterReportingAttributeChangeCallback. --- src/app/util/ember-compatibility-functions.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app/util/ember-compatibility-functions.cpp b/src/app/util/ember-compatibility-functions.cpp index 833c057eb40ae9..5d36978bbd4297 100644 --- a/src/app/util/ember-compatibility-functions.cpp +++ b/src/app/util/ember-compatibility-functions.cpp @@ -41,6 +41,7 @@ #include #include #include +#include #include #include @@ -1018,6 +1019,10 @@ void MatterReportingAttributeChangeCallback(EndpointId endpoint, ClusterId clust void MatterReportingAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { + // Attribute writes have asserted this already, but this assert should catch + // applications notifying about changes from their end. + assertChipStackLockedByCurrentThread(); + ClusterInfo info; info.mClusterId = clusterId; info.mAttributeId = attributeId;