postgres.git / summary / log / commit / refs

commit    efef460028adb000cede3aec7efaa06e65ff89e1
Author:   Neil Conway <neilc@samurai.com>
Date:     Sat Mar 18 22:10:44 2006 +0000
First released in: 8.2.0, 7.4.13, 8.0.8, 8.1.4

    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


src/backend/postmaster/postmaster.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index 8924649345a..7efba17bf36 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -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); [parent: ecd635c75513]