[Libguestfs] [PATCH nbdkit] server: Fix parameters of lock_request, unlock_request on fallback path.

Richard W.M. Jones rjones at redhat.com
Tue Apr 28 15:19:35 UTC 2020


On Haiku which doesn't have pipe2 we were using the fallback path.
However a previous change to remove the conn parameter of lock_request
and unlock_request had not been made to this code and so it failed to
compile.

Fixes: commit 91023f269d4cea56f573a1aa0d880b12052f6e1e
---
 server/connections.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/server/connections.c b/server/connections.c
index c7b55ca1..cc552b90 100644
--- a/server/connections.c
+++ b/server/connections.c
@@ -277,25 +277,25 @@ new_connection (int sockin, int sockout, int nworkers)
      * non-atomicity okay.
      */
     assert (thread_model <= NBDKIT_THREAD_MODEL_SERIALIZE_ALL_REQUESTS);
-    lock_request (NULL);
+    lock_request ();
     if (pipe (conn->status_pipe)) {
       perror ("pipe");
-      unlock_request (NULL);
+      unlock_request ();
       goto error2;
     }
     if (set_nonblock (set_cloexec (conn->status_pipe[0])) == -1) {
       perror ("fcntl");
       close (conn->status_pipe[1]);
-      unlock_request (NULL);
+      unlock_request ();
       goto error2;
     }
     if (set_nonblock (set_cloexec (conn->status_pipe[1])) == -1) {
       perror ("fcntl");
       close (conn->status_pipe[0]);
-      unlock_request (NULL);
+      unlock_request ();
       goto error2;
     }
-    unlock_request (NULL);
+    unlock_request ();
 #endif
   }
 
-- 
2.25.0




More information about the Libguestfs mailing list