about summary refs log tree commit diff
path: root/src/nix-worker/nix-worker.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix-worker/nix-worker.cc')
-rw-r--r--src/nix-worker/nix-worker.cc7
1 files changed, 5 insertions, 2 deletions
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());
         }