Skip to content

Commit

Permalink
Rework CHIP_MDNS_MINIMAL logic to allow for non-defined macro
Browse files Browse the repository at this point in the history
Signed-off-by: Maciej Grela <[email protected]>
  • Loading branch information
enkiusz committed Feb 4, 2025
1 parent 5eb60c6 commit 05cc5a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/server/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ config("server_config") {
}

if (chip_mdns_minimal) {
defines += [ "CHIP_MDNS_MINIMAL=1" ]
defines += [ "CHIP_MDNS_MINIMAL" ]
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/app/server/Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
#if CHIP_ENABLE_ROTATING_DEVICE_ID && defined(CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID)
#include <setup_payload/AdditionalDataPayloadGenerator.h>
#endif
#if CHIP_MDNS_MINIMAL
#ifdef CHIP_MDNS_MINIMAL
#include <lib/dnssd/minimal_mdns/AddressPolicy_SingleInterface.h>
#endif
#include <setup_payload/SetupPayload.h>
Expand Down Expand Up @@ -119,7 +119,7 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams)
mUserDirectedCommissioningPort = initParams.userDirectedCommissioningPort;
mInterfaceId = initParams.interfaceId;

#if CHIP_MDNS_MINIMAL
#ifdef CHIP_MDNS_MINIMAL
if (mInterfaceId != chip::Inet::InterfaceId::Null())
{
static mdns::Minimal::SingleInterfaceAddressPolicy policy(mdns::Minimal::GetAddressPolicy(), mInterfaceId);
Expand Down

0 comments on commit 05cc5a4

Please sign in to comment.