Skip to content

Commit

Permalink
Address review comments.
Browse files Browse the repository at this point in the history
Co-authored-by: Karsten Sperling <113487422+ksperling-apple@users.noreply.github.com>
  • Loading branch information
bzbarsky-apple and ksperling-apple authored Feb 21, 2023
1 parent 5b8af6f commit 07128a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/darwin/Framework/CHIP/MTRBaseDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,9 @@ typedef NS_ENUM(uint8_t, MTRTransportType) {
* passed to the completion, so values will only be passed in
* when the write succeeds. In that case, values will have
* the format documented in the definition of
* MTRDeviceResponseHandler and just contain a single entry
* with the path of the attribute that was written.
* MTRDeviceResponseHandler and will be an array with a single element
* which is a dictionary that has a MTRAttributePathKey entry in it, whose value
* is the attribute path that was successfully written to.
*/
- (void)writeAttributeWithEndpointID:(NSNumber *)endpointID
clusterID:(NSNumber *)clusterID
Expand Down
3 changes: 1 addition & 2 deletions src/darwin/Framework/CHIP/MTRBaseDevice.mm
Original file line number Diff line number Diff line change
Expand Up @@ -955,8 +955,7 @@ - (void)writeAttributeWithEndpointID:(NSNumber *)endpointID
// Controller::WriteAttribute guarantees that there will be exactly one call to either the success callback or the
// failure callback, for a non-group session.
auto onSuccessCb = [successCb, bridge](const app::ConcreteAttributePath & attribPath) {
auto resultArray = [[NSMutableArray alloc] init];
[resultArray addObject:@ { MTRAttributePathKey : [[MTRAttributePath alloc] initWithPath:attribPath] }];
auto resultArray = @[ @{ MTRAttributePathKey : [[MTRAttributePath alloc] initWithPath:attribPath] }] ];
successCb(bridge, resultArray);
};

Expand Down

0 comments on commit 07128a0

Please sign in to comment.