From 679226337ac3f44e784de0a95a8599dfd86401e8 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 31 Aug 2016 09:24:19 -0400 Subject: [PATCH] Remove no-longer-useful SSL-specific Port.count field. Since we removed SSL renegotiation, there's no longer any reason to keep track of the amount of data transferred over the link. Daniel Gustafsson Discussion: --- src/backend/libpq/be-secure-openssl.c | 6 ++---- src/include/libpq/libpq-be.h | 1 - 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/backend/libpq/be-secure-openssl.c b/src/backend/libpq/be-secure-openssl.c index e5f434ca17..bb0d2d977f 100644 --- a/src/backend/libpq/be-secure-openssl.c +++ b/src/backend/libpq/be-secure-openssl.c @@ -447,8 +447,6 @@ aloop: return -1; } - port->count = 0; - /* Get client certificate, if available. */ port->peer = SSL_get_peer_certificate(port->ssl); @@ -549,7 +547,7 @@ be_tls_read(Port *port, void *ptr, size_t len, int *waitfor) switch (err) { case SSL_ERROR_NONE: - port->count += n; + /* a-ok */ break; case SSL_ERROR_WANT_READ: *waitfor = WL_SOCKET_READABLE; @@ -609,7 +607,7 @@ be_tls_write(Port *port, void *ptr, size_t len, int *waitfor) switch (err) { case SSL_ERROR_NONE: - port->count += n; + /* a-ok */ break; case SSL_ERROR_WANT_READ: *waitfor = WL_SOCKET_READABLE; diff --git a/src/include/libpq/libpq-be.h b/src/include/libpq/libpq-be.h index 5d07b78223..ecdfbc60bb 100644 --- a/src/include/libpq/libpq-be.h +++ b/src/include/libpq/libpq-be.h @@ -192,7 +192,6 @@ typedef struct Port #ifdef USE_OPENSSL SSL *ssl; X509 *peer; - unsigned long count; #endif } Port;