Skip to content

Commit

Permalink
Inject nodeId from subscribed path to path set by SetDirty (project-c…
Browse files Browse the repository at this point in the history
…hip#11500)

--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 and PSONALl committed Dec 2, 2021
1 parent fcf8007 commit fa29be2
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 fa29be2

Please sign in to comment.