Skip to content

Commit

Permalink
[ChipTool] Remove a check for the RendezvousInformation inside manual…
Browse files Browse the repository at this point in the history
… code since it does not contains such information (#8626)
  • Loading branch information
vivien-apple authored and pull[bot] committed Aug 4, 2021
1 parent 2d0327c commit 3447472
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions examples/chip-tool/commands/pairing/PairingCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ CHIP_ERROR PairingCommand::PairWithQRCode(NodeId remoteId)
{
SetupPayload payload;
ReturnErrorOnFailure(QRCodeSetupPayloadParser(mOnboardingPayload).populatePayload(payload));

chip::RendezvousInformationFlags rendezvousInformation = payload.rendezvousInformation;
ReturnErrorCodeIf(rendezvousInformation != RendezvousInformationFlag::kBLE, CHIP_ERROR_INVALID_ARGUMENT);

return PairWithCode(remoteId, payload);
}

Expand All @@ -115,9 +119,6 @@ CHIP_ERROR PairingCommand::PairWithManualCode(NodeId remoteId)

CHIP_ERROR PairingCommand::PairWithCode(NodeId remoteId, SetupPayload payload)
{
chip::RendezvousInformationFlags rendezvousInformation = payload.rendezvousInformation;
ReturnErrorCodeIf(rendezvousInformation != RendezvousInformationFlag::kBLE, CHIP_ERROR_INVALID_ARGUMENT);

RendezvousParameters params = RendezvousParameters()
.SetSetupPINCode(payload.setUpPINCode)
.SetDiscriminator(payload.discriminator)
Expand Down

0 comments on commit 3447472

Please sign in to comment.