Commit a5dba023 authored by Neil Conway's avatar Neil Conway

The call to DNSServiceRegistrationCreate in postmaster.c does incorrect

byte-swapping on the port number which causes the call to fail on Intel
Macs.

This patch uses htons() instead of htonl() and fixes this bug.

Ashley Clark
parent b3358e26
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.482 2006/03/05 15:58:36 momjian Exp $ * $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.483 2006/03/18 22:09:58 neilc Exp $
* *
* NOTES * NOTES
* *
...@@ -810,7 +810,7 @@ PostmasterMain(int argc, char *argv[]) ...@@ -810,7 +810,7 @@ PostmasterMain(int argc, char *argv[])
DNSServiceRegistrationCreate(bonjour_name, DNSServiceRegistrationCreate(bonjour_name,
"_postgresql._tcp.", "_postgresql._tcp.",
"", "",
htonl(PostPortNumber), htons(PostPortNumber),
"", "",
(DNSServiceRegistrationReply) reg_reply, (DNSServiceRegistrationReply) reg_reply,
NULL); NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment