Skip to content

Commit

Permalink
Ugh.
Browse files Browse the repository at this point in the history
  • Loading branch information
woody-apple committed Jul 12, 2024
1 parent da49581 commit a951d47
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/darwin/Framework/CHIP/MTRDeviceController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ - (void)shutdown
return;
}

MTR_LOG("Shutting down MTRDeviceController: %@", self)
MTR_LOG("Shutting down MTRDeviceController: %@", self);
[self cleanupAfterStartup];
}

Expand All @@ -307,7 +307,7 @@ - (void)cleanupAfterStartup
// do the secure session shutdowns. Since we don't want to hold the lock
// while calling out into arbitrary invalidation code, snapshot the list of
// devices before we start invalidating.
MTR_LOG("cleanupAfterStartup MTRDeviceController: %@", self)
MTR_LOG("cleanupAfterStartup MTRDeviceController: %@", self);
os_unfair_lock_lock(&_deviceMapLock);
NSEnumerator * devices = [_nodeIDToDeviceMap objectEnumerator];
[_nodeIDToDeviceMap removeAllObjects];
Expand All @@ -325,7 +325,7 @@ - (void)cleanupAfterStartup
// in a very specific way that only MTRDeviceControllerFactory knows about.
- (void)shutDownCppController
{
MTR_LOG("shutDownCppController MTRDeviceController: %p", self)
MTR_LOG("shutDownCppController MTRDeviceController: %p", self);
assertChipStackLockedByCurrentThread();

// Shut down all our endpoints.
Expand Down Expand Up @@ -627,7 +627,7 @@ - (BOOL)startup:(MTRDeviceControllerStartupParamsInternal *)startupParams
});
}];
}
MTR_LOG("MTRDeviceController startup: %@", self)
MTR_LOG("MTRDeviceController startup: %@", self);

return YES;
}
Expand Down Expand Up @@ -952,8 +952,7 @@ - (void)preWarmCommissioningSession

- (MTRBaseDevice *)deviceBeingCommissionedWithNodeID:(NSNumber *)nodeID error:(NSError * __autoreleasing *)error
{
auto block = ^MTRBaseDevice *
{
auto block = ^MTRBaseDevice * {
chip::CommissioneeDeviceProxy * deviceProxy;

auto errorCode = self->_cppCommissioner->GetDeviceBeingCommissioned(nodeID.unsignedLongLongValue, &deviceProxy);
Expand Down Expand Up @@ -1112,8 +1111,7 @@ + (nullable NSData *)computePASEVerifierForSetupPasscode:(NSNumber *)setupPassco

- (NSData * _Nullable)attestationChallengeForDeviceID:(NSNumber *)deviceID
{
auto block = ^NSData *
{
auto block = ^NSData * {
chip::CommissioneeDeviceProxy * deviceProxy;

auto errorCode = CHIP_NO_ERROR;
Expand Down Expand Up @@ -1935,8 +1933,7 @@ - (NSString *)openPairingWindowWithPIN:(uint64_t)deviceID
return nil;
}

auto block = ^NSString *
{
auto block = ^NSString * {
chip::SetupPayload setupPayload;
errorCode = chip::Controller::AutoCommissioningWindowOpener::OpenCommissioningWindow(self->_cppCommissioner, deviceID,
chip::System::Clock::Seconds16(static_cast<uint16_t>(duration)), chip::Crypto::kSpake2p_Min_PBKDF_Iterations,
Expand Down

0 comments on commit a951d47

Please sign in to comment.