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 authored and woody-apple committed Jun 20, 2023
1 parent b7181b8 commit 0dbeeab
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 0dbeeab

Please sign in to comment.