Skip to content

Commit

Permalink
Inject nodeId from subscribed path to path set by SetDirty
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 committed Nov 5, 2021
1 parent 7addec8 commit 1762d5d
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'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))
{
Expand Down

0 comments on commit 1762d5d

Please sign in to comment.