aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2004-09-23 13:20:45 +0000
committerBruce Momjian <bruce@momjian.us>2004-09-23 13:20:45 +0000
commitfb755b6dd469d98cb9939be4cb48081aa1405e38 (patch)
tree0d955a5b831d5938e280c534fdb7955dcf9f6398 /src
parent31ae87c33296215681f4bd4e1db5ec9e591ab947 (diff)
downloadpostgresql-fb755b6dd469d98cb9939be4cb48081aa1405e38.tar.gz
postgresql-fb755b6dd469d98cb9939be4cb48081aa1405e38.zip
This patch logs the error code in the default case, so that the user
stands a chance of looking it up. "Unrecognised error" is always disheartening. :-) Dominic Mitchell
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/libpq/fe-secure.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/interfaces/libpq/fe-secure.c b/src/interfaces/libpq/fe-secure.c
index db254e52c27..f7bcd8f6fda 100644
--- a/src/interfaces/libpq/fe-secure.c
+++ b/src/interfaces/libpq/fe-secure.c
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.49 2004/08/29 05:07:00 momjian Exp $
+ * $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.50 2004/09/23 13:20:45 momjian Exp $
*
* NOTES
* The client *requires* a valid server certificate. Since
@@ -1019,7 +1019,8 @@ open_client_SSL(PGconn *conn)
r = SSL_connect(conn->ssl);
if (r <= 0)
{
- switch (SSL_get_error(conn->ssl, r))
+ int err = SSL_get_error(conn->ssl, r);
+ switch (err)
{
case SSL_ERROR_WANT_READ:
return PGRES_POLLING_READING;
@@ -1054,7 +1055,7 @@ open_client_SSL(PGconn *conn)
default:
printfPQExpBuffer(&conn->errorMessage,
- libpq_gettext("unrecognized SSL error code\n"));
+ libpq_gettext("unrecognized SSL error code (%d)\n"), err);
close_SSL(conn);
return PGRES_POLLING_FAILED;
}