|
10 | 10 | * Written by Peter Eisentraut <peter_e@gmx.net>.
|
11 | 11 | *
|
12 | 12 | * IDENTIFICATION
|
13 |
| - * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.515 2009/09/03 22:08:05 tgl Exp $ |
| 13 | + * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.516 2009/09/08 17:08:36 tgl Exp $ |
14 | 14 | *
|
15 | 15 | *--------------------------------------------------------------------
|
16 | 16 | */
|
@@ -152,6 +152,7 @@ static bool assign_phony_autocommit(bool newval, bool doit, GucSource source);
|
152 | 152 | static const char *assign_custom_variable_classes(const char *newval, bool doit,
|
153 | 153 | GucSource source);
|
154 | 154 | static bool assign_debug_assertions(bool newval, bool doit, GucSource source);
|
| 155 | +static bool assign_bonjour(bool newval, bool doit, GucSource source); |
155 | 156 | static bool assign_ssl(bool newval, bool doit, GucSource source);
|
156 | 157 | static bool assign_stage_log_stats(bool newval, bool doit, GucSource source);
|
157 | 158 | static bool assign_log_stats(bool newval, bool doit, GucSource source);
|
@@ -681,6 +682,14 @@ static struct config_bool ConfigureNamesBool[] =
|
681 | 682 | &session_auth_is_superuser,
|
682 | 683 | false, NULL, NULL
|
683 | 684 | },
|
| 685 | + { |
| 686 | + {"bonjour", PGC_POSTMASTER, CONN_AUTH_SETTINGS, |
| 687 | + gettext_noop("Enables advertising the server via Bonjour."), |
| 688 | + NULL |
| 689 | + }, |
| 690 | + &enable_bonjour, |
| 691 | + false, assign_bonjour, NULL |
| 692 | + }, |
684 | 693 | {
|
685 | 694 | {"ssl", PGC_POSTMASTER, CONN_AUTH_SECURITY,
|
686 | 695 | gettext_noop("Enables SSL connections."),
|
@@ -2199,7 +2208,7 @@ static struct config_string ConfigureNamesString[] =
|
2199 | 2208 |
|
2200 | 2209 | {
|
2201 | 2210 | {"bonjour_name", PGC_POSTMASTER, CONN_AUTH_SETTINGS,
|
2202 |
| - gettext_noop("Sets the Bonjour broadcast service name."), |
| 2211 | + gettext_noop("Sets the Bonjour service name."), |
2203 | 2212 | NULL
|
2204 | 2213 | },
|
2205 | 2214 | &bonjour_name,
|
@@ -7394,6 +7403,21 @@ assign_debug_assertions(bool newval, bool doit, GucSource source)
|
7394 | 7403 | return true;
|
7395 | 7404 | }
|
7396 | 7405 |
|
| 7406 | +static bool |
| 7407 | +assign_bonjour(bool newval, bool doit, GucSource source) |
| 7408 | +{ |
| 7409 | +#ifndef USE_BONJOUR |
| 7410 | + if (newval) |
| 7411 | + { |
| 7412 | + ereport(GUC_complaint_elevel(source), |
| 7413 | + (errcode(ERRCODE_INVALID_PARAMETER_VALUE), |
| 7414 | + errmsg("Bonjour is not supported by this build"))); |
| 7415 | + return false; |
| 7416 | + } |
| 7417 | +#endif |
| 7418 | + return true; |
| 7419 | +} |
| 7420 | + |
7397 | 7421 | static bool
|
7398 | 7422 | assign_ssl(bool newval, bool doit, GucSource source)
|
7399 | 7423 | {
|
|
0 commit comments