From 68f5e3934d7fc5d5173346099aa3aec382dcca91 Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Thu, 14 Jul 2022 06:03:58 -0700 Subject: [PATCH] Fail darwin-framework-tool pairing commands once the SDK says it's failed. (#20639) (#20717) That's what chip-tool does. Without this, darwin-framework-tool ends up sitting there until the (2-minute) command timeout. Fixes https://github.com/project-chip/connectedhomeip/issues/20589 Co-authored-by: Boris Zbarsky --- .../commands/pairing/PairingDelegateBridge.mm | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/darwin-framework-tool/commands/pairing/PairingDelegateBridge.mm b/examples/darwin-framework-tool/commands/pairing/PairingDelegateBridge.mm index 0bd24146b76aba..5aee425f2e3739 100644 --- a/examples/darwin-framework-tool/commands/pairing/PairingDelegateBridge.mm +++ b/examples/darwin-framework-tool/commands/pairing/PairingDelegateBridge.mm @@ -33,6 +33,7 @@ - (void)onStatusUpdate:(MTRPairingStatus)status break; case MTRPairingStatusFailed: ChipLogError(chipTool, "Secure Pairing Failed"); + _commandBridge->SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE); break; case MTRPairingStatusUnknown: ChipLogError(chipTool, "Uknown Pairing Status");