diff options
author | Robert Hensing <roberth@users.noreply.github.com> | 2023-10-20 15:34:26 +0200 |
---|---|---|
committer | eldritch horrors <pennae@lix.systems> | 2024-03-04 04:43:35 +0100 |
commit | ab40b2c5d0f90d6a119bf4b368f933f5331b0c15 (patch) | |
tree | 305c600d732546077701abefc9dddecdd2eadf0f /src/nix-store | |
parent | 5ddd1a916667ec0d969f99a0a85a2092bf18b632 (diff) |
Merge pull request #9157 from obsidiansystems/protocol-versions
Add protocol versions to `{Worker,Serve}Proto::*Conn`
(cherry picked from commit 4d17c59d8d059a5b39f1d1da2b58f2ec8da44861)
Change-Id: I497af39deb792e50c157a1305d8c9e722798740b
Diffstat (limited to 'src/nix-store')
-rw-r--r-- | src/nix-store/nix-store.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc index 9b6c80a75..11d2e86e3 100644 --- a/src/nix-store/nix-store.cc +++ b/src/nix-store/nix-store.cc @@ -818,10 +818,16 @@ static void opServe(Strings opFlags, Strings opArgs) if (magic != SERVE_MAGIC_1) throw Error("protocol mismatch"); out << SERVE_MAGIC_2 << SERVE_PROTOCOL_VERSION; out.flush(); - unsigned int clientVersion = readInt(in); + ServeProto::Version clientVersion = readInt(in); - ServeProto::ReadConn rconn { .from = in }; - ServeProto::WriteConn wconn { .to = out }; + ServeProto::ReadConn rconn { + .from = in, + .version = clientVersion, + }; + ServeProto::WriteConn wconn { + .to = out, + .version = clientVersion, + }; auto getBuildSettings = [&]() { // FIXME: changing options here doesn't work if we're |