Remove no-longer-useful SSL-specific Port.count field.
authorTom Lane <[email protected]>
Wed, 31 Aug 2016 13:24:19 +0000 (09:24 -0400)
committerTom Lane <[email protected]>
Wed, 31 Aug 2016 13:24:19 +0000 (09:24 -0400)
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: <FEA7F89C-ECDF-4799-B789-2F8DDCBA467F@yesql.se>

src/backend/libpq/be-secure-openssl.c
src/include/libpq/libpq-be.h

index e5f434ca17a0b2cfe1ebe314ce4e83406e0edb94..bb0d2d977f5b9b01a9867c1b3e7337bd8d1e5a8a 100644 (file)
@@ -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;
index 5d07b782237ffdbfa7e0127f2a16039d0dfbcffc..ecdfbc60bb5c9d031953a0eec8c530af091fba22 100644 (file)
@@ -192,7 +192,6 @@ typedef struct Port
 #ifdef USE_OPENSSL
        SSL                *ssl;
        X509       *peer;
-       unsigned long count;
 #endif
 } Port;