Skip to content

Commit

Permalink
Remove log only delegate bridge from darwin chip controller (#15737)
Browse files Browse the repository at this point in the history
* Stop processing Address change notifications within darwin chip device controller

* Restyle
  • Loading branch information
andy31415 authored and pull[bot] committed Aug 2, 2023
1 parent 0ad3af7 commit bc1f785
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/darwin/Framework/CHIP/CHIPDeviceController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ - (BOOL)startup:(_Nullable id<CHIPPersistentStorageDelegate>)storageDelegate
params.fabricStorage = _fabricStorage;
params.fabricIndependentStorage = _persistentStorageDelegateBridge;
commissionerParams.storageDelegate = _persistentStorageDelegateBridge;
commissionerParams.deviceAddressUpdateDelegate = _pairingDelegateBridge;
commissionerParams.deviceAddressUpdateDelegate = nullptr;
commissionerParams.pairingDelegate = _pairingDelegateBridge;

commissionerParams.operationalCredentialsDelegate = _operationalCredentialsDelegate;
Expand Down
5 changes: 1 addition & 4 deletions src/darwin/Framework/CHIP/CHIPDevicePairingDelegateBridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@

NS_ASSUME_NONNULL_BEGIN

class CHIPDevicePairingDelegateBridge : public chip::Controller::DevicePairingDelegate,
public chip::Controller::DeviceAddressUpdateDelegate
class CHIPDevicePairingDelegateBridge : public chip::Controller::DevicePairingDelegate
{
public:
CHIPDevicePairingDelegateBridge();
Expand All @@ -40,8 +39,6 @@ class CHIPDevicePairingDelegateBridge : public chip::Controller::DevicePairingDe

void OnCommissioningComplete(chip::NodeId deviceId, CHIP_ERROR error) override;

void OnAddressUpdateComplete(chip::NodeId nodeId, CHIP_ERROR error) override;

private:
id<CHIPDevicePairingDelegate> mDelegate;
dispatch_queue_t mQueue;
Expand Down
6 changes: 0 additions & 6 deletions src/darwin/Framework/CHIP/CHIPDevicePairingDelegateBridge.mm
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,3 @@
}
}
}

void CHIPDevicePairingDelegateBridge::OnAddressUpdateComplete(chip::NodeId nodeId, CHIP_ERROR error)
{
// Todo, is there any benefit of exposing this anymore?
NSLog(@"OnAddressUpdateComplete. Status %s", chip::ErrorStr(error));
}

0 comments on commit bc1f785

Please sign in to comment.