Skip to content

Commit

Permalink
Delete log-only delegate from platform app for 'device address resolv…
Browse files Browse the repository at this point in the history
…ed' (#15736)

* Delete log-only delegate from platform app

* Remove the derive in pairing command
  • Loading branch information
andy31415 authored and pull[bot] committed Aug 2, 2023
1 parent bc1f785 commit 3077218
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions examples/platform/linux/AppMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ CHIP_ERROR ShutdownCommissioner()
return CHIP_NO_ERROR;
}

class PairingCommand : public Controller::DevicePairingDelegate, public Controller::DeviceAddressUpdateDelegate
class PairingCommand : public Controller::DevicePairingDelegate
{
public:
PairingCommand() :
Expand All @@ -389,9 +389,6 @@ class PairingCommand : public Controller::DevicePairingDelegate, public Controll
void OnPairingDeleted(CHIP_ERROR error) override;
void OnCommissioningComplete(NodeId deviceId, CHIP_ERROR error) override;

/////////// DeviceAddressUpdateDelegate Interface /////////
void OnAddressUpdateComplete(NodeId nodeId, CHIP_ERROR error) override;

CHIP_ERROR UpdateNetworkAddress();

private:
Expand All @@ -413,11 +410,6 @@ CHIP_ERROR PairingCommand::UpdateNetworkAddress()
return gCommissioner.UpdateDevice(gRemoteId);
}

void PairingCommand::OnAddressUpdateComplete(NodeId nodeId, CHIP_ERROR err)
{
ChipLogProgress(AppServer, "OnAddressUpdateComplete: %s", ErrorStr(err));
}

void PairingCommand::OnStatusUpdate(DevicePairingDelegate::Status status)
{
switch (status)
Expand Down Expand Up @@ -527,7 +519,6 @@ CHIP_ERROR CommissionerPairOnNetwork(uint32_t pincode, uint16_t disc, Transport:
{
RendezvousParameters params = RendezvousParameters().SetSetupPINCode(pincode).SetDiscriminator(disc).SetPeerAddress(address);

gCommissioner.RegisterDeviceAddressUpdateDelegate(&gPairingCommand);
gCommissioner.RegisterPairingDelegate(&gPairingCommand);
gCommissioner.PairDevice(gRemoteId, params);

Expand Down

0 comments on commit 3077218

Please sign in to comment.