Skip to content

Commit

Permalink
Inject nodeId from subscribed path to path set by SetDirty (#11500)
Browse files Browse the repository at this point in the history
--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.
  • Loading branch information
yunhanw-google authored Nov 6, 2021
1 parent 6201b8e commit 0c35285
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app/reporting/Engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,11 @@ CHIP_ERROR Engine::BuildSingleReportDataAttributeDataList(ReportDataMessage::Bui
{
if (clusterInfo->IsAttributePathSupersetOf(*path))
{
err = RetrieveClusterData(apReadHandler->GetFabricIndex(), attributeDataList, *path);
// SetDirty injects 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))
{
Expand Down

0 comments on commit 0c35285

Please sign in to comment.