summaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-misc.c
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2014-12-01 17:43:14 +0200
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2014-12-01 17:45:04 +0200
commit4e86f1b16da85ba0a99c592dc7b977b3be80a483 (patch)
tree38f0c162189df4ab209b3832f6215d8c2b9725c1 /src/interfaces/libpq/fe-misc.c
parent6d6cade05bcb68ca8677aa5502ca73274d6e4539 (diff)
Put SSL_pending() call behind the new internal SSL API.
It seems likely that any SSL implementation will need a similar call, not just OpenSSL.
Diffstat (limited to 'src/interfaces/libpq/fe-misc.c')
-rw-r--r--src/interfaces/libpq/fe-misc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/interfaces/libpq/fe-misc.c b/src/interfaces/libpq/fe-misc.c
index f58d7987423..de0f9efd275 100644
--- a/src/interfaces/libpq/fe-misc.c
+++ b/src/interfaces/libpq/fe-misc.c
@@ -1054,9 +1054,9 @@ pqSocketCheck(PGconn *conn, int forRead, int forWrite, time_t end_time)
return -1;
}
-#ifdef USE_OPENSSL
+#ifdef USE_SSL
/* Check for SSL library buffering read bytes */
- if (forRead && conn->ssl && SSL_pending(conn->ssl) > 0)
+ if (forRead && conn->ssl_in_use && pgtls_read_pending(conn) > 0)
{
/* short-circuit the select */
return 1;