Skip to content

Commit

Permalink
Fix port logging in OnNewInterface.
Browse files Browse the repository at this point in the history
The port is in network byte order, not native.
  • Loading branch information
bzbarsky-apple committed Sep 2, 2022
1 parent e56afce commit 8017d27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/platform/Darwin/DnssdContexts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ void ResolveContext::OnNewInterface(uint32_t interfaceId, const char * fullname,
}
#endif // CHIP_DETAIL_LOGGING
ChipLogDetail(Discovery, "Mdns : %s hostname:%s fullname:%s interface: %" PRIu32 " port: %u TXT:\"%s\"", __func__,
hostnameWithDomain, fullname, interfaceId, port, txtString.c_str());
hostnameWithDomain, fullname, interfaceId, ntohs(port), txtString.c_str());

InterfaceInfo interface;
interface.service.mPort = ntohs(port);
Expand Down

0 comments on commit 8017d27

Please sign in to comment.