Skip to content

Commit

Permalink
[factorydata] dont read factorydata if CONFIG_ENABLE_AMEBA_FACTORY_DA…
Browse files Browse the repository at this point in the history
…TA is disabled
  • Loading branch information
pankore committed Dec 29, 2022
1 parent 4a630a8 commit e84f7d4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/platform/Ameba/FactoryDataProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ CHIP_ERROR LoadKeypairFromRaw(ByteSpan private_key, ByteSpan public_key, Crypto:
CHIP_ERROR FactoryDataProvider::Init()
{
CHIP_ERROR err = CHIP_NO_ERROR;
#if CONFIG_ENABLE_AMEBA_FACTORY_DATA
uint8_t buffer[2048]; // FactoryData won't overflow 2KB
uint16_t factorydata_len;

Expand All @@ -66,6 +67,7 @@ CHIP_ERROR FactoryDataProvider::Init()
}

ChipLogProgress(DeviceLayer, "FactoryData of length: %d retrieved successfully", factorydata_len);
#endif // CONFIG_ENABLE_AMEBA_FACTORY_DATA

return err;
}
Expand Down

0 comments on commit e84f7d4

Please sign in to comment.