summaryrefslogtreecommitdiffstats
path: root/src/protocol-simple.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocol-simple.c')
-rw-r--r--src/protocol-simple.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/protocol-simple.c b/src/protocol-simple.c
index 1c462b39..d34a5d02 100644
--- a/src/protocol-simple.c
+++ b/src/protocol-simple.c
@@ -78,13 +78,15 @@ static int do_read(struct connection *c) {
chunk.memblock = memblock_new(BUFSIZE);
assert(chunk.memblock);
+
+ memblock_stamp(chunk.memblock);
if ((r = iochannel_read(c->io, chunk.memblock->data, BUFSIZE)) <= 0) {
fprintf(stderr, "read(): %s\n", r == 0 ? "EOF" : strerror(errno));
memblock_unref(chunk.memblock);
return -1;
}
-
+
chunk.memblock->length = r;
chunk.length = r;
chunk.index = 0;