Skip to content

Commit

Permalink
Build failure when mDNS is disabled (#6038) (#6040)
Browse files Browse the repository at this point in the history
  • Loading branch information
pjzander-signify authored Apr 15, 2021
1 parent f5f9134 commit 3510f14
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app/server/Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
#include <system/TLVPacketBufferBackingStore.h>
#include <transport/SecureSessionMgr.h>

#if CHIP_DEVICE_CONFIG_ENABLE_MDNS
#include "Mdns.h"
#endif

using namespace ::chip;
using namespace ::chip::Inet;
Expand Down Expand Up @@ -274,6 +276,7 @@ class ServerRendezvousAdvertisementDelegate : public RendezvousAdvertisementDele
return CHIP_NO_ERROR;
}

#if CHIP_DEVICE_CONFIG_ENABLE_MDNS
void RendezvousComplete() const override
{
// Once rendezvous completed, assume we are operational
Expand All @@ -282,6 +285,7 @@ class ServerRendezvousAdvertisementDelegate : public RendezvousAdvertisementDele
ChipLogError(Discovery, "Failed to start advertising operational state at rendezvous completion time.");
}
}
#endif

void SetDelegate(AppDelegate * delegate) { mDelegate = delegate; }
void SetBLE(bool ble) { isBLE = ble; }
Expand Down Expand Up @@ -528,7 +532,9 @@ void InitServer(AppDelegate * delegate)

// Starting mDNS server only for Thread devices due to problem reported in issue #5076.
#if CHIP_DEVICE_CONFIG_ENABLE_THREAD
#if CHIP_DEVICE_CONFIG_ENABLE_MDNS
app::Mdns::StartServer();
#endif
#endif

gCallbacks.SetSessionMgr(&gSessions);
Expand Down

0 comments on commit 3510f14

Please sign in to comment.