From c370755583d7350f4b96136eb0a6a8a7b08551b1 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 16 Nov 2007 16:15:26 +0000 Subject: * Flag `--no-build-hook' to disable distributed builds. * queryDeriver in daemon mode: don't barf if the other side returns an empty string (which means there is no deriver). --- src/nix-worker/nix-worker.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/nix-worker/nix-worker.cc') diff --git a/src/nix-worker/nix-worker.cc b/src/nix-worker/nix-worker.cc index 9f387a4ec130..5e261aa16198 100644 --- a/src/nix-worker/nix-worker.cc +++ b/src/nix-worker/nix-worker.cc @@ -223,7 +223,8 @@ struct TunnelSource : Source }; -static void performOp(Source & from, Sink & to, unsigned int op) +static void performOp(unsigned int clientVersion, + Source & from, Sink & to, unsigned int op) { switch (op) { @@ -422,6 +423,8 @@ static void performOp(Source & from, Sink & to, unsigned int op) verbosity = (Verbosity) readInt(from); maxBuildJobs = readInt(from); maxSilentTime = readInt(from); + if (GET_PROTOCOL_MINOR(clientVersion) >= 2) + useBuildHook = readInt(from) != 0; startWork(); stopWork(); break; @@ -492,7 +495,7 @@ static void processConnection() opCount++; try { - performOp(from, to, op); + performOp(clientVersion, from, to, op); } catch (Error & e) { stopWork(false, e.msg()); } -- cgit 1.4.1