From 186819080baea53410ae8d8100179a3874ac1e32 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 19 May 2020 21:07:05 +0200 Subject: Simplify stream availability handling Just have a simply number of bytes argument to avoid a lot of complexity. --- common/rdr/TLSInStream.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'common/rdr/TLSInStream.cxx') diff --git a/common/rdr/TLSInStream.cxx b/common/rdr/TLSInStream.cxx index 92c2f0c6..70303db0 100644 --- a/common/rdr/TLSInStream.cxx +++ b/common/rdr/TLSInStream.cxx @@ -36,7 +36,7 @@ ssize_t TLSInStream::pull(gnutls_transport_ptr_t str, void* data, size_t size) InStream *in = self->in; try { - if (!in->check(1, 1, false)) { + if (!in->check(1, false)) { gnutls_transport_set_errno(self->session, EAGAIN); return -1; } @@ -84,7 +84,7 @@ size_t TLSInStream::readTLS(U8* buf, size_t len, bool wait) int n; if (gnutls_record_check_pending(session) == 0) { - n = in->check(1, 1, wait); + n = in->check(1, wait); if (n == 0) return 0; } -- cgit v1.2.3