diff options
author | Pierre Ossman <ossman@cendio.se> | 2020-05-19 21:07:05 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2020-05-21 11:34:22 +0200 |
commit | 186819080baea53410ae8d8100179a3874ac1e32 (patch) | |
tree | ddc4371f612a76114562f4a890a4c3ac3b3bfea6 /common/rdr/TLSInStream.cxx | |
parent | e9425ac04d70481f7cb168a19bcbc47728f838c7 (diff) | |
download | tigervnc-186819080baea53410ae8d8100179a3874ac1e32.tar.gz tigervnc-186819080baea53410ae8d8100179a3874ac1e32.zip |
Simplify stream availability handling
Just have a simply number of bytes argument to avoid a lot of
complexity.
Diffstat (limited to 'common/rdr/TLSInStream.cxx')
-rw-r--r-- | common/rdr/TLSInStream.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
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; } |