Have SSL text print only when SSL mode is enabled.
authorBruce Momjian <[email protected]>
Sat, 26 Jul 2003 15:22:22 +0000 (15:22 +0000)
committerBruce Momjian <[email protected]>
Sat, 26 Jul 2003 15:22:22 +0000 (15:22 +0000)
src/backend/libpq/auth.c

index 4777b2c882febf1fa783952b5e7e9d663c8c2bac..c735be8cc8df2d22296ef7f8fe1863222b7fc314 100644 (file)
@@ -440,15 +440,16 @@ ClientAuthentication(Port *port)
                                                                NI_NUMERICHOST);
 
 #ifdef USE_SSL
-#define EREPORT_SSL_STATUS     (port->ssl ? "on" : "off")
-#else
-#define EREPORT_SSL_STATUS     "off"
-#endif
-
                                ereport(FATAL,
                                                (errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION),
                                                 errmsg("no pg_hba.conf entry for host \"%s\", user \"%s\", database \"%s\", SSL \"%s\"",
-                                                               hostinfo, port->user_name, port->database_name, EREPORT_SSL_STATUS)));
+                                                               hostinfo, port->user_name, port->database_name, port->ssl ? "on" : "off")));
+#else
+                               ereport(FATAL,
+                                               (errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION),
+                                                errmsg("no pg_hba.conf entry for host \"%s\", user \"%s\", database \"%s\"",
+                                                               hostinfo, port->user_name, port->database_name)));
+#endif
                                break;
                        }