Skip to content

Commit

Permalink
Darwin - Pass the port advertised by mdns in network byte order (proj…
Browse files Browse the repository at this point in the history
  • Loading branch information
vivien-apple authored Jun 9, 2021
1 parent 6720406 commit 8f119cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/platform/Darwin/MdnsImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,8 @@ CHIP_ERROR Register(uint32_t interfaceId, const char * type, const char * name,
}

sdCtx = chip::Platform::New<RegisterContext>(type, nullptr);
err = DNSServiceRegister(&sdRef, 0 /* flags */, interfaceId, name, type, kLocalDomain, NULL, port, recordLen, recordBytesPtr,
OnRegister, sdCtx);
err = DNSServiceRegister(&sdRef, 0 /* flags */, interfaceId, name, type, kLocalDomain, NULL, ntohs(port), recordLen,
recordBytesPtr, OnRegister, sdCtx);
TXTRecordDeallocate(recordRef);

VerifyOrReturnError(CheckForSuccess(sdCtx, __func__, err), CHIP_ERROR_INTERNAL);
Expand Down

0 comments on commit 8f119cf

Please sign in to comment.