diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-05-18 01:20:33 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-05-18 01:20:33 +0000 |
commit | 2df0eb1d57a74576526e3bad4b57bb9e53c88bdb (patch) | |
tree | 130f74372bcd4cfe97f60819e4d59a0907ab80fc | |
parent | cac0d6922f88a368dd1afa3b0933512f32d1a977 (diff) | |
download | postgresql-2df0eb1d57a74576526e3bad4b57bb9e53c88bdb.tar.gz postgresql-2df0eb1d57a74576526e3bad4b57bb9e53c88bdb.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.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/src/backend/libpq/be-secure.c b/src/backend/libpq/be-secure.c index 56fefae95a0..f0a375165ba 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.59.2.2 2006/05/12 22:44:43 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/libpq/be-secure.c,v 1.59.2.3 2007/05/18 01:20:33 tgl Exp $ * * Since the server static private key ($DataDir/server.key) * will normally be stored unencrypted so that the database @@ -281,15 +281,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; } |