From 0ae1557ed9a7f8b46b6d7e2feaf2fad4cc2c3b3d Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 23 Aug 2022 17:09:40 +0200 Subject: Make BufferedInStream allocation more available Allow subclasses to call it, instead of it being strictly internal. This is useful when a subclass can only provide data in minimum sized chunks. --- 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 014789e3..aa552e86 100644 --- a/common/rdr/TLSInStream.cxx +++ b/common/rdr/TLSInStream.cxx @@ -88,9 +88,9 @@ TLSInStream::~TLSInStream() delete saved_exception; } -bool TLSInStream::fillBuffer(size_t maxSize) +bool TLSInStream::fillBuffer() { - size_t n = readTLS((U8*) end, maxSize); + size_t n = readTLS((U8*) end, availSpace()); if (n == 0) return false; end += n; -- cgit v1.2.3