From c22a7f50cb4a476f0c276d8e0d2194da5144ce92 Mon Sep 17 00:00:00 2001 From: Jade Lovelace Date: Fri, 24 May 2024 20:45:05 -0600 Subject: libstore: refuse to serialise ancient protocols We don't want to deal with these at all, let's stop doing so. (marking this one as the fix commit since its immediate predecessors aren't the complete fix) Fixes: https://git.lix.systems/lix-project/lix/issues/325 Change-Id: Ieea1b0b8ac0f903d1e24e5b3e63cfe12eeec119d --- src/libstore/daemon.cc | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'src/libstore/daemon.cc') diff --git a/src/libstore/daemon.cc b/src/libstore/daemon.cc index e256ad1de..c89b5f5b3 100644 --- a/src/libstore/daemon.cc +++ b/src/libstore/daemon.cc @@ -264,14 +264,8 @@ static void performOp(TunnelLogger * logger, ref store, TrustedFlag trusted, RecursiveFlag recursive, WorkerProto::Version clientVersion, Source & from, BufferedSink & to, WorkerProto::Op op) { - WorkerProto::ReadConn rconn { - .from = from, - .version = clientVersion, - }; - WorkerProto::WriteConn wconn { - .to = to, - .version = clientVersion, - }; + WorkerProto::ReadConn rconn{from, clientVersion}; + WorkerProto::WriteConn wconn{to, clientVersion}; switch (op) { @@ -1030,10 +1024,7 @@ void processConnection( auto temp = trusted ? store->isTrustedClient() : std::optional { NotTrusted }; - WorkerProto::WriteConn wconn { - .to = to, - .version = clientVersion, - }; + WorkerProto::WriteConn wconn {to, clientVersion}; WorkerProto::write(*store, wconn, temp); } -- cgit v1.2.3