From 1ec4b820aef7ebbd7ef7e78cb18a459ac239847c Mon Sep 17 00:00:00 2001 From: James Swan <122404367+swan-amazon@users.noreply.github.com> Date: Tue, 7 May 2024 18:32:59 +0000 Subject: [PATCH] Update default config values to use build constants Replaced hardcoded default values in ConfigurationManagerImpl with constants defined in CHIPBuildConfig to ensure uniformity and ease of future modifications. --- src/platform/Linux/ConfigurationManagerImpl.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/platform/Linux/ConfigurationManagerImpl.cpp b/src/platform/Linux/ConfigurationManagerImpl.cpp index bae62e2024c179..2a4822a2f87058 100644 --- a/src/platform/Linux/ConfigurationManagerImpl.cpp +++ b/src/platform/Linux/ConfigurationManagerImpl.cpp @@ -24,6 +24,7 @@ */ #include +#include #include #include #include @@ -120,29 +121,29 @@ CHIP_ERROR ConfigurationManagerImpl::Init() if (!PosixConfig::ConfigValueExists(PosixConfig::kConfigKey_TCAcceptedVersion)) { - uint16_t tcAcceptedVersion = 0U; + uint16_t tcAcceptedVersion = CHIP_CONFIG_TNC_ACCEPTED_VERSION; err = WriteConfigValue(PosixConfig::kConfigKey_TCAcceptedVersion, tcAcceptedVersion); SuccessOrExit(err); } if (!PosixConfig::ConfigValueExists(PosixConfig::kConfigKey_TCMinRequiredVersion)) { - uint16_t tcMinRequiredVersion = 0U; + uint16_t tcMinRequiredVersion = CHIP_CONFIG_TNC_REQUIRED_VERSION; err = WriteConfigValue(PosixConfig::kConfigKey_TCMinRequiredVersion, tcMinRequiredVersion); SuccessOrExit(err); } if (!PosixConfig::ConfigValueExists(PosixConfig::kConfigKey_TCAcknowledgements)) { - uint16_t tcAcknowledgements = 0U; + uint16_t tcAcknowledgements = CHIP_CONFIG_TNC_ACCEPTED_ACKNOWLEDGEMENTS; err = WriteConfigValue(PosixConfig::kConfigKey_TCAcknowledgements, tcAcknowledgements); SuccessOrExit(err); } if (!PosixConfig::ConfigValueExists(PosixConfig::kConfigKey_TCAcknowledgementsRequired)) { - uint16_t tcAcknowledgementsRequired = 0U; - err = WriteConfigValue(PosixConfig::kConfigKey_TCAcknowledgementsRequired, tcAcknowledgementsRequired); + uint16_t tcAcknowledgementsRequired = CHIP_CONFIG_TNC_REQUIRED_ACKNOWLEDGEMENTS; + err = WriteConfigValue(PosixConfig::kConfigKey_TCAcknowledgementsRequired, tcAcknowledgementsRequired); SuccessOrExit(err); }