From b08923b4a06cf585b038e73cc277fccff8ce9b58 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Mon, 21 May 2018 17:26:41 -0500 Subject: serialise: fix buffer size used, hide method for internal use only Fixes #2169. --- src/libutil/serialise.hh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/libutil/serialise.hh') diff --git a/src/libutil/serialise.hh b/src/libutil/serialise.hh index 6e703c52a1..14b62fdb67 100644 --- a/src/libutil/serialise.hh +++ b/src/libutil/serialise.hh @@ -77,10 +77,12 @@ struct BufferedSource : Source size_t read(unsigned char * data, size_t len) override; - /* Underlying read call, to be overridden. */ - virtual size_t readUnbuffered(unsigned char * data, size_t len) = 0; bool hasData(); + +protected: + /* Underlying read call, to be overridden. */ + virtual size_t readUnbuffered(unsigned char * data, size_t len) = 0; }; @@ -134,8 +136,9 @@ struct FdSource : BufferedSource return *this; } - size_t readUnbuffered(unsigned char * data, size_t len) override; bool good() override; +protected: + size_t readUnbuffered(unsigned char * data, size_t len) override; private: bool _good = true; }; -- cgit 1.4.1