Skip to content

Commit

Permalink
Fix printing of port in Darwin OnResolve callback. (#27660)
Browse files Browse the repository at this point in the history
The port here is in network byte order.
  • Loading branch information
bzbarsky-apple authored Jul 6, 2023
1 parent 2170067 commit ba5c7c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/platform/Darwin/DnssdImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ static void OnResolve(DNSServiceRef sdRef, DNSServiceFlags flags, uint32_t inter
void * context)
{
ChipLogProgress(Discovery, "Mdns: %s flags: %d, interface: %u, fullname: %s, hostname: %s, port: %u", __func__, flags,
(unsigned) interfaceId, StringOrNullMarker(fullname), StringOrNullMarker(hostname), port);
(unsigned) interfaceId, StringOrNullMarker(fullname), StringOrNullMarker(hostname), ntohs(port));
auto sdCtx = reinterpret_cast<ResolveContext *>(context);
ReturnOnFailure(MdnsContexts::GetInstance().Has(sdCtx));
LogOnFailure(__func__, err);
Expand Down

0 comments on commit ba5c7c5

Please sign in to comment.