Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 6792263

Browse files
committed
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: <FEA7F89C-ECDF-4799-B789-2F8DDCBA467F@yesql.se>
1 parent 14cca1b commit 6792263

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

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

+2-4
Original file line numberDiff line numberDiff line change
@@ -447,8 +447,6 @@ be_tls_open_server(Port *port)
447447
return -1;
448448
}
449449

450-
port->count = 0;
451-
452450
/* Get client certificate, if available. */
453451
port->peer = SSL_get_peer_certificate(port->ssl);
454452

@@ -549,7 +547,7 @@ be_tls_read(Port *port, void *ptr, size_t len, int *waitfor)
549547
switch (err)
550548
{
551549
case SSL_ERROR_NONE:
552-
port->count += n;
550+
/* a-ok */
553551
break;
554552
case SSL_ERROR_WANT_READ:
555553
*waitfor = WL_SOCKET_READABLE;
@@ -609,7 +607,7 @@ be_tls_write(Port *port, void *ptr, size_t len, int *waitfor)
609607
switch (err)
610608
{
611609
case SSL_ERROR_NONE:
612-
port->count += n;
610+
/* a-ok */
613611
break;
614612
case SSL_ERROR_WANT_READ:
615613
*waitfor = WL_SOCKET_READABLE;

src/include/libpq/libpq-be.h

-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ typedef struct Port
192192
#ifdef USE_OPENSSL
193193
SSL *ssl;
194194
X509 *peer;
195-
unsigned long count;
196195
#endif
197196
} Port;
198197

0 commit comments

Comments
 (0)