From 643925014c81f560e27aa97ae72e7ef6c58f5e95 Mon Sep 17 00:00:00 2001 From: yunhanw Date: Fri, 5 Nov 2021 13:38:56 -0700 Subject: [PATCH] Inject nodeId from subscribed path to path set by SetDirty --SetDirty don't take the nodeId in clusterInfo, it just mark all interested attribute dirty, when generated report, we need explicitly inject node Id from subscribed path to interested dirty path, then construct correct tlv representation. --- src/app/reporting/Engine.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/reporting/Engine.cpp b/src/app/reporting/Engine.cpp index 546d9e93d239c0..cb27df4d65a47f 100644 --- a/src/app/reporting/Engine.cpp +++ b/src/app/reporting/Engine.cpp @@ -124,7 +124,11 @@ CHIP_ERROR Engine::BuildSingleReportDataAttributeDataList(ReportDataMessage::Bui { if (clusterInfo->IsAttributePathSupersetOf(*path)) { - err = RetrieveClusterData(apReadHandler->GetFabricIndex(), attributeDataList, *path); + // SetDirty's inject path into GlobalDirtySet path that don't have the particular nodeId, + // need to inject nodeId from subscribed path here. + ClusterInfo dirtyPath = *path; + dirtyPath->mNodeId = clusterInfo->mNodeId; + err = RetrieveClusterData(apReadHandler->GetFabricIndex(), attributeDataList, dirtyPath); } else if (path->IsAttributePathSupersetOf(*clusterInfo)) {