diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/postmaster/postmaster.c | 29 | ||||
-rw-r--r-- | src/include/pg_config.h.in | 3 |
2 files changed, 31 insertions, 1 deletions
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index ef4266be53c..5b16d06a994 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.331 2003/05/28 19:36:28 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.332 2003/06/11 06:56:06 momjian Exp $ * * NOTES * @@ -85,6 +85,10 @@ #include <getopt.h> #endif +#ifdef USE_RENDEZVOUS +#include <DNSServiceDiscovery/DNSServiceDiscovery.h> +#endif + #include "catalog/pg_database.h" #include "commands/async.h" #include "lib/dllist.h" @@ -366,6 +370,17 @@ checkDataDir(const char *checkdir) } +#ifdef USE_RENDEZVOUS + +/* reg_reply -- empty callback function for DNSServiceRegistrationCreate() */ +static void +reg_reply(DNSServiceRegistrationReplyErrorType errorCode, void *context) +{ + +} + +#endif + int PostmasterMain(int argc, char *argv[]) { @@ -724,6 +739,18 @@ PostmasterMain(int argc, char *argv[]) elog(LOG, "IPv4 socket created"); } #endif +#ifdef USE_RENDEZVOUS + if (service_name != NULL) + { + DNSServiceRegistrationCreate(NULL, /* default to hostname */ + "_postgresql._tcp.", + "", + htonl(PostPortNumber), + "", + (DNSServiceRegistrationReply)reg_reply, + NULL); + } +#endif } #ifdef HAVE_UNIX_SOCKETS diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in index bc6d89ada15..b20cecf1948 100644 --- a/src/include/pg_config.h.in +++ b/src/include/pg_config.h.in @@ -564,6 +564,9 @@ /* Define to 1 to build with PAM support. (--with-pam) */ #undef USE_PAM +/* Define to 1 to build with Rendezvous support. (--with-rendezvous) */ +#undef USE_RENDEZVOUS + /* Define to build with (Open)SSL support. (--with-openssl) */ #undef USE_SSL |