Skip to content

Commit

Permalink
[server] Moved GetSetupPasscode failure log. (#22716)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kkasperczyk-no authored Sep 25, 2022
1 parent bdb77b0 commit dc66d4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/server/OnboardingCodesUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<unsigned>(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
}
Expand Down

0 comments on commit dc66d4e

Please sign in to comment.