From: Neil Conway Date: Sat, 18 Mar 2006 22:10:44 +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=8bc346430808f2a0a6baa7260d8772118d014442;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 a4d3638beb..0523db3d98 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -782,7 +782,7 @@ PostmasterMain(int argc, char *argv[]) DNSServiceRegistrationCreate(rendezvous_name, "_postgresql._tcp.", "", - htonl(PostPortNumber), + htons(PostPortNumber), "", (DNSServiceRegistrationReply) reg_reply, NULL);