From dc66d4efbd95c55c6564c2432f4929cb5a46ba24 Mon Sep 17 00:00:00 2001 From: Kamil Kasperczyk <66371704+kkasperczyk-no@users.noreply.github.com> Date: Sun, 25 Sep 2022 20:44:32 +0200 Subject: [PATCH] [server] Moved GetSetupPasscode failure log. (#22716) The GetSetupPasscode() failure log is printed even in case of using the default passcode, what may bring confusion to the user if everything went fine. Moved error log to be printed only if there is no default passcode to be used. --- src/app/server/OnboardingCodesUtil.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/server/OnboardingCodesUtil.cpp b/src/app/server/OnboardingCodesUtil.cpp index 44c5e3553f9469..bef0b751b9d5d6 100644 --- a/src/app/server/OnboardingCodesUtil.cpp +++ b/src/app/server/OnboardingCodesUtil.cpp @@ -105,12 +105,12 @@ CHIP_ERROR GetPayloadContents(chip::PayloadContents & aPayload, chip::Rendezvous err = GetCommissionableDataProvider()->GetSetupPasscode(aPayload.setUpPINCode); if (err != CHIP_NO_ERROR) { - ChipLogError(AppServer, "GetCommissionableDataProvider()->GetSetupPasscode() failed: %" CHIP_ERROR_FORMAT, err.Format()); #if defined(CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE) && CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE ChipLogProgress(AppServer, "*** Using default EXAMPLE passcode %u ***", static_cast(CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE)); aPayload.setUpPINCode = CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE; #else + ChipLogError(AppServer, "GetCommissionableDataProvider()->GetSetupPasscode() failed: %" CHIP_ERROR_FORMAT, err.Format()); return err; #endif }