Skip to content

Commit

Permalink
Restyled by clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits authored and nivi-apple committed Mar 29, 2024
1 parent 46cf550 commit d822cbd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/platform/Darwin/DnssdImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ static void OnGetAddrInfo(DNSServiceRef sdRef, DNSServiceFlags flags, uint32_t i
if (kDNSServiceErr_NoError == err)
{
InterfaceKey interfaceKey = { interfaceId, hostname, contextWithType->isSRPResolve };
CHIP_ERROR error = sdCtx->OnNewAddress(interfaceKey, address);
CHIP_ERROR error = sdCtx->OnNewAddress(interfaceKey, address);

// If we saw an address resolved on the SRP domain, set the shouldStartSRPTimerForResolve to false.
if (error == CHIP_NO_ERROR && contextWithType->isSRPResolve)
Expand Down Expand Up @@ -341,8 +341,8 @@ static void GetAddrInfo(ResolveContext * sdCtx)

ResolveContextWithType * contextWithType =
(interface.first.isSRPResult) ? &sdCtx->resolveContextWithSRPType : &sdCtx->resolveContextWithNonSRPType;
auto err = DNSServiceGetAddrInfo(&sdRefCopy, kGetAddrInfoFlags, interfaceId, protocol, hostname, OnGetAddrInfo,
contextWithType);
auto err =
DNSServiceGetAddrInfo(&sdRefCopy, kGetAddrInfoFlags, interfaceId, protocol, hostname, OnGetAddrInfo, contextWithType);
VerifyOrReturn(kDNSServiceErr_NoError == err, sdCtx->Finalize(err));
interface.second.isDNSLookUpRequested = true;
}
Expand Down
9 changes: 5 additions & 4 deletions src/platform/Darwin/DnssdImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@ struct InterfaceKey
{
return (this->interfaceId < other.interfaceId) ||
((this->interfaceId == other.interfaceId) && (this->hostname < other.hostname)) ||
((this->interfaceId == other.interfaceId) && (this->hostname == other.hostname) && (this->isSRPResult < other.isSRPResult));
((this->interfaceId == other.interfaceId) && (this->hostname == other.hostname) &&
(this->isSRPResult < other.isSRPResult));
}

uint32_t interfaceId;
Expand Down Expand Up @@ -265,10 +266,10 @@ struct ResolveContext : public GenericContext
// Indicates whether the timer for 250 msecs should be started
// to give the resolve on SRP domain some extra time to complete.
bool shouldStartSRPTimerForResolve = false;
bool isSRPTimerRunning = false;
bool isSRPTimerRunning = false;

ResolveContextWithType resolveContextWithSRPType = {this , true};
ResolveContextWithType resolveContextWithNonSRPType = {this, false};
ResolveContextWithType resolveContextWithSRPType = { this, true };
ResolveContextWithType resolveContextWithNonSRPType = { this, false };

// browseCausingResolve can be null.
ResolveContext(void * cbContext, DnssdResolveCallback cb, chip::Inet::IPAddressType cbAddressType,
Expand Down

0 comments on commit d822cbd

Please sign in to comment.