diff --git a/src/backend/libpq/be-secure.c b/src/backend/libpq/be-secure.c index a6003c9e004..772cd71a1f5 100644 --- a/src/backend/libpq/be-secure.c +++ b/src/backend/libpq/be-secure.c @@ -11,7 +11,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/libpq/be-secure.c,v 1.74.2.1 2007/01/26 20:07:01 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/libpq/be-secure.c,v 1.74.2.2 2007/05/18 01:20:25 tgl Exp $ * * Since the server static private key ($DataDir/server.key) * will normally be stored unencrypted so that the database @@ -280,15 +280,9 @@ rloop: #endif goto rloop; case SSL_ERROR_SYSCALL: - if (n == -1) - ereport(COMMERROR, - (errcode_for_socket_access(), - errmsg("SSL SYSCALL error: %m"))); - else + /* leave it to caller to ereport the value of errno */ + if (n != -1) { - ereport(COMMERROR, - (errcode(ERRCODE_PROTOCOL_VIOLATION), - errmsg("SSL SYSCALL error: EOF detected"))); errno = ECONNRESET; n = -1; } @@ -380,15 +374,9 @@ wloop: #endif goto wloop; case SSL_ERROR_SYSCALL: - if (n == -1) - ereport(COMMERROR, - (errcode_for_socket_access(), - errmsg("SSL SYSCALL error: %m"))); - else + /* leave it to caller to ereport the value of errno */ + if (n != -1) { - ereport(COMMERROR, - (errcode(ERRCODE_PROTOCOL_VIOLATION), - errmsg("SSL SYSCALL error: EOF detected"))); errno = ECONNRESET; n = -1; }