]> granicus.if.org Git - postgresql/commitdiff
The call to DNSServiceRegistrationCreate in postmaster.c does incorrect
authorNeil Conway <neilc@samurai.com>
Sat, 18 Mar 2006 22:10:44 +0000 (22:10 +0000)
committerNeil Conway <neilc@samurai.com>
Sat, 18 Mar 2006 22:10:44 +0000 (22:10 +0000)
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

src/backend/postmaster/postmaster.c

index 8924649345a5ca25bf8066bc2a403c3fb8b25682..7efba17bf3622a6286ee59bb977750b542982e55 100644 (file)
@@ -37,7 +37,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.347.2.2 2004/02/23 20:46:16 tgl Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.347.2.3 2006/03/18 22:10:44 neilc Exp $
  *
  * NOTES
  *
@@ -782,7 +782,7 @@ PostmasterMain(int argc, char *argv[])
                        DNSServiceRegistrationCreate(rendezvous_name,
                                                                                 "_postgresql._tcp.",
                                                                                 "",
-                                                                                htonl(PostPortNumber),
+                                                                                htons(PostPortNumber),
                                                                                 "",
                                                                 (DNSServiceRegistrationReply) reg_reply,
                                                                                 NULL);