Skip to content

Commit

Permalink
Fix the check for the cluster paths
Browse files Browse the repository at this point in the history
  • Loading branch information
nivi-apple committed May 20, 2024
1 parent a78c3c3 commit 7a09a12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/darwin/Framework/CHIP/MTRDevice.mm
Original file line number Diff line number Diff line change
Expand Up @@ -2844,7 +2844,7 @@ - (void)_pruneOrphanedEndpointsAndClusters:(MTRAttributePath *)attributePath
NSDictionary<MTRClusterPath *, MTRDeviceClusterData *> * dataStoreClusterData = [self.deviceController.controllerDataStore getStoredClusterDataForNodeID:self.nodeID];
NSMutableDictionary<MTRClusterPath *, MTRDeviceClusterData *> * dataStoreClusterDataCopy = [dataStoreClusterData mutableCopy];
for (MTRClusterPath * dataStorePath in dataStoreClusterData) {
if ([dataStorePath isEqualTo:path]) {
if ([dataStorePath.endpoint isEqualToNumber:path.endpoint] && [dataStorePath.cluster isEqualToNumber:path.cluster]) {
[dataStoreClusterDataCopy removeObjectForKey:path];
[dataStoreClusterDataCopy setObject:clusterData forKey:path];
[self.deviceController.controllerDataStore storeClusterData:dataStoreClusterDataCopy forNodeID:self.nodeID];
Expand Down

0 comments on commit 7a09a12

Please sign in to comment.