aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-05-18 01:20:48 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-05-18 01:20:48 +0000
commit81df147acbacc719ea4a904f11b201577b061551 (patch)
tree36841cba6b15afde17db19419623ce5015aa86a8
parent7ee0498772e11631f9da2d8dd68f62843f7d651b (diff)
downloadpostgresql-81df147acbacc719ea4a904f11b201577b061551.tar.gz
postgresql-81df147acbacc719ea4a904f11b201577b061551.zip
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 0ee0bc1c825..2ef6b4ac0b4 100644
--- a/src/backend/libpq/be-secure.c
+++ b/src/backend/libpq/be-secure.c
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/be-secure.c,v 1.43.2.3 2006/05/12 22:44:58 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/be-secure.c,v 1.43.2.4 2007/05/18 01:20:48 tgl Exp $
*
* Since the server static private key ($DataDir/server.key)
* will normally be stored unencrypted so that the database
@@ -269,15 +269,9 @@ rloop:
case SSL_ERROR_WANT_WRITE:
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;
}
@@ -360,15 +354,9 @@ wloop:
case SSL_ERROR_WANT_WRITE:
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;
}