aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/remote-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2011-12-16 19:44:13 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2011-12-16 19:44:13 +0000
commite0bd307802d13476055f8ba99ab7808de0fd71e5 (patch)
tree83be8fedec92ebb15f05120e2e49451841699482 /src/libstore/remote-store.cc
parent78598d06f0240a15b74720d8f987daeb702318d7 (diff)
* Make the import operation through the daemon much more efficient
(way fewer roundtrips) by allowing the client to send data in bigger chunks. * Some refactoring.
Diffstat (limited to 'src/libstore/remote-store.cc')
-rw-r--r--src/libstore/remote-store.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc
index 7bf0ad7bd..e976e8fa5 100644
--- a/src/libstore/remote-store.cc
+++ b/src/libstore/remote-store.cc
@@ -501,11 +501,11 @@ void RemoteStore::processStderr(Sink * sink, Source * source)
}
else if (msg == STDERR_READ) {
if (!source) throw Error("no source");
- unsigned int len = readInt(from);
+ size_t len = readInt(from);
unsigned char * buf = new unsigned char[len];
AutoDeleteArray<unsigned char> d(buf);
- (*source)(buf, len);
- writeString(string((const char *) buf, len), to);
+ size_t n = source->read(buf, len);
+ writeString(string((const char *) buf, n), to); // !!! inefficient
to.flush();
}
else {