From: Neil Conway Date: Sat, 18 Mar 2006 22:10:14 +0000 (+0000) Subject: The call to DNSServiceRegistrationCreate in postmaster.c does incorrect X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=5f8933f046410fe9103c261fabad408b5a5e19a0;p=users%2Fbernd%2Fpostgres.git The call to DNSServiceRegistrationCreate in postc 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 --- diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index 4a9c1e98f3..9aac1f2fbc 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -760,7 +760,7 @@ PostmasterMain(int argc, char *argv[]) DNSServiceRegistrationCreate(rendezvous_name, "_postgresql._tcp.", "", - htonl(PostPortNumber), + htons(PostPortNumber), "", (DNSServiceRegistrationReply) reg_reply, NULL);