From 344747254d903679e2681f97d08e9625d6864d32 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Thu, 29 Jul 2021 22:57:35 +0200 Subject: [PATCH] [ChipTool] Remove a check for the RendezvousInformation inside manual code since it does not contains such information (#8626) --- examples/chip-tool/commands/pairing/PairingCommand.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/chip-tool/commands/pairing/PairingCommand.cpp b/examples/chip-tool/commands/pairing/PairingCommand.cpp index ffbf6b7c9812f1..efacd1dcbaaadf 100644 --- a/examples/chip-tool/commands/pairing/PairingCommand.cpp +++ b/examples/chip-tool/commands/pairing/PairingCommand.cpp @@ -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); } @@ -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)