Skip to content

Commit fb755b6

Browse files
committed
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
1 parent 31ae87c commit fb755b6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/interfaces/libpq/fe-secure.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.49 2004/08/29 05:07:00 momjian Exp $
14+
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.50 2004/09/23 13:20:45 momjian Exp $
1515
*
1616
* NOTES
1717
* The client *requires* a valid server certificate. Since
@@ -1019,7 +1019,8 @@ open_client_SSL(PGconn *conn)
10191019
r = SSL_connect(conn->ssl);
10201020
if (r <= 0)
10211021
{
1022-
switch (SSL_get_error(conn->ssl, r))
1022+
int err = SSL_get_error(conn->ssl, r);
1023+
switch (err)
10231024
{
10241025
case SSL_ERROR_WANT_READ:
10251026
return PGRES_POLLING_READING;
@@ -1054,7 +1055,7 @@ open_client_SSL(PGconn *conn)
10541055

10551056
default:
10561057
printfPQExpBuffer(&conn->errorMessage,
1057-
libpq_gettext("unrecognized SSL error code\n"));
1058+
libpq_gettext("unrecognized SSL error code (%d)\n"), err);
10581059
close_SSL(conn);
10591060
return PGRES_POLLING_FAILED;
10601061
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy