diff options
Diffstat (limited to 'src/libstore/remote-store.cc')
-rw-r--r-- | src/libstore/remote-store.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc index 82181b921..d445cbcb6 100644 --- a/src/libstore/remote-store.cc +++ b/src/libstore/remote-store.cc @@ -466,7 +466,7 @@ void RemoteStore::addToStore(const ValidPathInfo & info, Source & source, sink << exportMagic << printStorePath(info.path); - WorkerProto::WriteConn nested { .to = sink, .version = conn->daemonVersion }; + WorkerProto::WriteConn nested { sink, conn->daemonVersion }; WorkerProto::write(*this, nested, info.references); sink << (info.deriver ? printStorePath(*info.deriver) : "") @@ -511,14 +511,13 @@ void RemoteStore::addMultipleToStore( RepairFlag repair, CheckSigsFlag checkSigs) { + auto remoteVersion = getProtocol(); + auto source = sinkToSource([&](Sink & sink) { sink << pathsToCopy.size(); for (auto & [pathInfo, pathSource] : pathsToCopy) { WorkerProto::Serialise<ValidPathInfo>::write(*this, - WorkerProto::WriteConn { - .to = sink, - .version = 16, - }, + WorkerProto::WriteConn {sink, remoteVersion}, pathInfo); pathSource->drainInto(sink); } |