summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2007-05-18 01:20:40 +0000
committerTom Lane2007-05-18 01:20:40 +0000
commit52b18de290d4e86cf523cb666f0154f65c8432a9 (patch)
treecfb376e2b948b64955382920e0f2aa6e50221ca8
parent8e0bcdc855c4976a31f9fd03e80b2c996f30fd27 (diff)
Remove redundant logging of send failures when SSL is in use. While pqcomm.c
had been taught not to do that ages ago, the SSL code was helpfully bleating anyway. Resolves some recent reports such as bug #3266; however the underlying cause of the related bug #2829 is still unclear.
-rw-r--r--src/backend/libpq/be-secure.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/src/backend/libpq/be-secure.c b/src/backend/libpq/be-secure.c
index 78e18d1bc2c..09019c3f0ff 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.56.4.2 2006/05/12 22:44:50 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/libpq/be-secure.c,v 1.56.4.3 2007/05/18 01:20:40 tgl Exp $
*
* Since the server static private key ($DataDir/server.key)
* will normally be stored unencrypted so that the database
@@ -276,15 +276,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;
}
@@ -375,15 +369,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;
}