Displaying 3 results from an estimated 3 matches for "8fa7e21b".
2020 Feb 11
0
[PATCH nbdkit 1/3] server: Add GET_CONN macro, alias for threadlocal_get_conn ().
...rn void threadlocal_set_conn (struct connection *conn);
extern struct connection *threadlocal_get_conn (void);
+#define GET_CONN (threadlocal_get_conn ())
/* Declare program_name. */
#if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME == 1
diff --git a/server/public.c b/server/public.c
index 418945fe..8fa7e21b 100644
--- a/server/public.c
+++ b/server/public.c
@@ -533,7 +533,7 @@ nbdkit_nanosleep (unsigned sec, unsigned nsec)
* NBD_CMD_DISC or a problem with the connection
* - the input socket detects POLLRDHUP/POLLHUP/POLLERR
*/
- struct connection *conn = threadlocal_get_conn ();
+ stru...
2020 Feb 11
5
[PATCH nbdkit 0/3] server: Remove explicit connection parameter.
The third patch is a large but mechanical change which gets rid of
passing around struct connection * entirely within the server,
preferring instead to reference the connection through thread-local
storage.
I hope this is a gateway to simplifying other parts of the code.
Rich.
2020 Feb 11
0
[PATCH nbdkit 3/3] server: Remove explicit connection parameter, use TLS instead.
...error);
}
else
- return send_simple_reply (conn, request.handle, cmd, flags, buf, count,
+ return send_simple_reply (request.handle, cmd, flags, buf, count,
error);
}
diff --git a/server/public.c b/server/public.c
index 8fa7e21b..97de4a42 100644
--- a/server/public.c
+++ b/server/public.c
@@ -562,7 +562,7 @@ nbdkit_nanosleep (unsigned sec, unsigned nsec)
* event, we know the connection should be shutting down.
*/
assert (quit ||
- (conn && conn->nworkers > 0 && connection_get_statu...