Skip to content

Commit bf5636f

Browse files
committedJan 20, 2025
[General Commissioning Server] Dynamically encode the feature map 'GeneralCommissioning::Feature::kTermsAndConditions' if CHIP_CONFIG_TERMS_AND_CONDITIONS_REQUIRED is set
1 parent cc14cb5 commit bf5636f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
 

‎src/app/clusters/general-commissioning-server/general-commissioning-server.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,14 @@ CHIP_ERROR GeneralCommissioningGlobalInstance::Read(const ConcreteReadAttributeP
107107

108108
switch (aPath.mAttributeId)
109109
{
110+
case FeatureMap::Id: {
111+
BitFlags<GeneralCommissioning::Feature> features;
112+
#if CHIP_CONFIG_TERMS_AND_CONDITIONS_REQUIRED
113+
features.Set(GeneralCommissioning::Feature::kTermsAndConditions);
114+
#endif // CHIP_CONFIG_TERMS_AND_CONDITIONS_REQUIRED
115+
return aEncoder.Encode(features);
116+
}
117+
110118
case RegulatoryConfig::Id: {
111119
return ReadIfSupported(&ConfigurationManager::GetRegulatoryLocation, aEncoder);
112120
}

0 commit comments

Comments
 (0)