about summary refs log tree commit diff
path: root/src/libutil/serialise.hh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2018-05-22T09·31+0200
committerGitHub <noreply@github.com>2018-05-22T09·31+0200
commit9064dd2f4daab34718c0143be235e8eb95c671bd (patch)
tree71d65f60a2cdc742ac741e7be384ce57a39dc229 /src/libutil/serialise.hh
parent966407bcf1cf86de508b20fef43cffb81d8a87dc (diff)
parentb08923b4a06cf585b038e73cc277fccff8ce9b58 (diff)
Merge pull request #2173 from dtzWill/fix/serialise-read-unbuffered
serialise: fix buffer size used, hide method for internal use only
Diffstat (limited to 'src/libutil/serialise.hh')
-rw-r--r--src/libutil/serialise.hh9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/libutil/serialise.hh b/src/libutil/serialise.hh
index 6e703c52a1e3..14b62fdb6774 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;
 };