Skip to content

Commit

Permalink
Darwin - Pass the port advertised by mdns in network byte order
Browse files Browse the repository at this point in the history
  • Loading branch information
vivien-apple committed Jun 9, 2021
1 parent 82f42e4 commit daac88e
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 daac88e

Please sign in to comment.