>From aaf8498929c129f3bc7134fb7cdd11035efb019d Mon Sep 17 00:00:00 2001
From: Daniel Gustafsson <daniel@yesql.se>
Date: Tue, 30 Aug 2016 15:01:34 +0200
Subject: [PATCH 1/2] Remove leftover member count in Port

Commit 426746b9 which removed SSL renegotiation support removed all
consumers of the count member in the Port struct. Remove leftovers.
---
 src/backend/libpq/be-secure-openssl.c | 8 --------
 src/include/libpq/libpq-be.h          | 1 -
 2 files changed, 9 deletions(-)

diff --git a/src/backend/libpq/be-secure-openssl.c b/src/backend/libpq/be-secure-openssl.c
index e5f434c..389891d 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);
 
@@ -548,9 +546,6 @@ be_tls_read(Port *port, void *ptr, size_t len, int *waitfor)
 	ecode = (err != SSL_ERROR_NONE || n < 0) ? ERR_get_error() : 0;
 	switch (err)
 	{
-		case SSL_ERROR_NONE:
-			port->count += n;
-			break;
 		case SSL_ERROR_WANT_READ:
 			*waitfor = WL_SOCKET_READABLE;
 			errno = EWOULDBLOCK;
@@ -608,9 +603,6 @@ be_tls_write(Port *port, void *ptr, size_t len, int *waitfor)
 	ecode = (err != SSL_ERROR_NONE || n < 0) ? ERR_get_error() : 0;
 	switch (err)
 	{
-		case SSL_ERROR_NONE:
-			port->count += n;
-			break;
 		case SSL_ERROR_WANT_READ:
 			*waitfor = WL_SOCKET_READABLE;
 			errno = EWOULDBLOCK;
diff --git a/src/include/libpq/libpq-be.h b/src/include/libpq/libpq-be.h
index 5d07b78..ecdfbc6 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;
 
-- 
2.6.4 (Apple Git-63)

