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.  :-)

-Dom
Index: src/interfaces/libpq/fe-secure.c
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/interfaces/libpq/fe-secure.c,v
retrieving revision 1.49
diff -u -r1.49 fe-secure.c
--- src/interfaces/libpq/fe-secure.c    29 Aug 2004 05:07:00 -0000      1.49
+++ src/interfaces/libpq/fe-secure.c    21 Sep 2004 22:52:48 -0000
@@ -1019,7 +1019,8 @@
        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 @@
 
                        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;
                }
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to