diff --git a/src/app/server/Dnssd.cpp b/src/app/server/Dnssd.cpp index fbac27fa3a526c..1ec2fa0b8ffdb4 100644 --- a/src/app/server/Dnssd.cpp +++ b/src/app/server/Dnssd.cpp @@ -195,8 +195,6 @@ CHIP_ERROR DnssdServer::AdvertiseOperational() #if CHIP_CONFIG_ENABLE_ICD_SERVER AddICDKeyToAdvertisement(advertiseParameters); -#else - advertiseParameters.SetICDModeToAdvertise(Dnssd::ICDModeAdvertise::kNone); #endif auto & mdnsAdvertiser = chip::Dnssd::ServiceAdvertiser::Instance(); @@ -270,8 +268,6 @@ CHIP_ERROR DnssdServer::Advertise(bool commissionableNode, chip::Dnssd::Commissi #if CHIP_CONFIG_ENABLE_ICD_SERVER AddICDKeyToAdvertisement(advertiseParameters); -#else - advertiseParameters.SetICDModeToAdvertise(Dnssd::ICDModeAdvertise::kNone); #endif if (commissionableNode) diff --git a/src/lib/dnssd/Advertiser.h b/src/lib/dnssd/Advertiser.h index 79a3cac5e787b4..ddd8df259b1364 100644 --- a/src/lib/dnssd/Advertiser.h +++ b/src/lib/dnssd/Advertiser.h @@ -125,7 +125,7 @@ class BaseAdvertisingParams size_t mMacLength = 0; Optional mLocalMRPConfig; Optional mTcpSupported; - ICDModeAdvertise mICDModeAdvertise; + ICDModeAdvertise mICDModeAdvertise = ICDModeAdvertise::kNone; }; /// Defines parameters required for advertising a CHIP node