Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix mismatched expectations on index retrieval in Ember cluster lookup (
#12750) AttributePathExpandIterator uses emberAfClusterIndex to look up the index of a cluster within a given endpoint. This in turn calls into emberAfFindClusterInTypeWithMfgCode to find that index. This returns an index that indexes into all clusters in that endpoint regardless of type. Later on however, it uses emberAfGetNthClusterId to retrieve the actual cluster index for a given index. However, this function applies the index as though it's indexing into a list of clusters that match the masking criteria (i.e server or client). This results in it retrieving the wrong cluster in cases where there is a mix of client and server clusters on a given endpoint. Since most places use this 'scoped index', this PR fixes emberAfFindClusterInTypeWithMfgCode to return a scoped index instead. Problem: Marc noted that when reading the WifiDiagnostics cluster, that on the server, the logs indicated a retrieval of a ClusterId 0x36, but the subsequent logs in the reporting engine seemed to indicate it was picking up ClusterId 0x37 oddly enough. Testing: Validated that the above bug no longer happens, as well as reading out the entire device using wildcards in the REPL to ensure everything still works.
- Loading branch information