Skip to content

Commit

Permalink
Address more review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
bzbarsky-apple committed Aug 29, 2023
1 parent 73d668f commit e6278e2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm
Original file line number Diff line number Diff line change
Expand Up @@ -650,11 +650,14 @@ - (MTRDeviceController * _Nullable)_startDeviceController:(id)startupParams
storageDelegate = params.storageDelegate;
storageDelegateQueue = params.storageDelegateQueue;
uniqueIdentifier = params.uniqueIdentifier;
} else {
} else if ([startupParams isKindOfClass:[MTRDeviceControllerStartupParams class]]) {
MTRDeviceControllerStartupParams * params = startupParams;
storageDelegate = nil;
storageDelegateQueue = nil;
uniqueIdentifier = params.uniqueIdentifier;
} else {
MTR_LOG_ERROR("Unknown kind of startup params: %@", startupParams);
return nil;
}

if (_usingPerControllerStorage && storageDelegate == nil) {
Expand Down
6 changes: 6 additions & 0 deletions src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,12 @@ - (instancetype)initWithParameters:(MTRDeviceControllerStartupParameters *)param

_ipk = params.ipk;
_vendorID = params.vendorID;
// Note: Since we have an operationalCertificate, we do not need a nodeID as
// part of our params; it will not be used. Don't even initialize it, to
// avoid confusion about that.
//
// We don't really use the fabricID for anything either, but we promise to
// have a non-nil one, which is why we set it above.
_nodeID = nil;
_caseAuthenticatedTags = nil;
_rootCertificate = params.rootCertificate;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2022-2023 Project CHIP Authors
* Copyright (c) 2023 Project CHIP Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -62,7 +62,7 @@ typedef NS_ENUM(NSUInteger, MTRStorageSharingType) {
* it is to get its controllerID.
*
* 2) The delegate method calls will happen on the queue that was provided along
* with the gelegate. All Matter work will be blocked until the method
* with the delegate. All Matter work will be blocked until the method
* completes, and these calls may themselves block other Matter API calls
* from completing. Attempting to call any Matter API on the queue used for
* this delegate, apart from de-serializing and serializing the items being
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022-2023 Project CHIP Authors
* Copyright (c) 2023 Project CHIP Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down

0 comments on commit e6278e2

Please sign in to comment.