Skip to content

Commit

Permalink
DnssdImpl.cpp: make work without INET_CONFIG_ENABLE_IPV4
Browse files Browse the repository at this point in the history
  • Loading branch information
plan44 committed Jun 24, 2023
1 parent 817b402 commit 6923380
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/platform/Linux/DnssdImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -491,8 +491,11 @@ CHIP_ERROR MdnsAvahi::PublishService(const DnssdService & service, DnssdPublishC
chip::Inet::IPAddress addr;
if ((addr_it.GetAddress(addr) == CHIP_NO_ERROR) &&
((service.mAddressType == chip::Inet::IPAddressType::kAny) ||
(addr.IsIPv6() && service.mAddressType == chip::Inet::IPAddressType::kIPv6) ||
(addr.IsIPv4() && service.mAddressType == chip::Inet::IPAddressType::kIPv4)))
(addr.IsIPv6() && service.mAddressType == chip::Inet::IPAddressType::kIPv6)
#if INET_CONFIG_ENABLE_IPV4
|| (addr.IsIPv4() && service.mAddressType == chip::Inet::IPAddressType::kIPv4)
#endif
))
{
VerifyOrExit(addr.ToString(b) != nullptr, error = CHIP_ERROR_INTERNAL);
AvahiAddress a;
Expand Down

0 comments on commit 6923380

Please sign in to comment.