From: Neil Conway Date: Sat, 18 Mar 2006 22:10:11 +0000 (+0000) Subject: The call to DNSServiceRegistrationCreate in postmaster.c does incorrect X-Git-Url: http://waps.l3s.uni-hannover.de/gitweb/?a=commitdiff_plain;h=fa3674217b140ebe3bed0e5ba89e544d3ce2ab22;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 90e60b32cf..80bba7d152 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -771,7 +771,7 @@ PostmasterMain(int argc, char *argv[]) DNSServiceRegistrationCreate(bonjour_name, "_postgresql._tcp.", "", - htonl(PostPortNumber), + htons(PostPortNumber), "", (DNSServiceRegistrationReply) reg_reply, NULL);