Displaying 7 results from an estimated 7 matches for "next_preconnect".
2020 Feb 12
0
[PATCH nbdkit 3/3] server: filters: Remove struct b_h.
...in .open, and serves as
- * a stable ‘void *nxdata’ in the filter API.
- */
-struct b_h {
- struct backend *b;
- void *handle;
-};
-
/* Note this frees the whole chain. */
static void
filter_free (struct backend *b)
@@ -186,20 +176,19 @@ filter_config_complete (struct backend *b)
static int
next_preconnect (void *nxdata, int readonly)
{
- struct b_h *b_h = nxdata;
- return b_h->b->preconnect (b_h->b, readonly);
+ struct backend *b_next = nxdata;
+ return b_next->preconnect (b_next, readonly);
}
static int
filter_preconnect (struct backend *b, int readonly)
{
struct backend_f...
2020 Feb 11
1
Re: [PATCH nbdkit 3/3] server: Remove explicit connection parameter, use TLS instead.
...t; * a stable ‘void *nxdata’ in the filter API.
> */
> -struct b_conn {
> +struct b_h {
> struct backend *b;
> - struct connection *conn;
> void *handle;
> };
>
> @@ -186,22 +186,22 @@ filter_config_complete (struct backend *b)
> static int
> next_preconnect (void *nxdata, int readonly)
> {
> - struct b_conn *b_conn = nxdata;
> - return b_conn->b->preconnect (b_conn->b, b_conn->conn, readonly);
> + struct b_h *b_h = nxdata;
> + return b_h->b->preconnect (b_h->b, readonly);
> }
None of the next_*() wrapper...
2020 Feb 12
2
[nbdkit PATCH] filters: Remove most next_* wrappers
...#else
+typedef void backend;
+#endif
+
/* Next ops. */
-typedef int nbdkit_next_config (void *nxdata,
+typedef int nbdkit_next_config (backend *nxdata,
const char *key, const char *value);
-typedef int nbdkit_next_config_complete (void *nxdata);
-typedef int nbdkit_next_preconnect (void *nxdata, int readonly);
-typedef int nbdkit_next_open (void *nxdata, int readonly);
+typedef int nbdkit_next_config_complete (backend *nxdata);
+typedef int nbdkit_next_preconnect (backend *nxdata, int readonly);
+typedef int nbdkit_next_open (backend *nxdata, int readonly);
struct nbdkit_n...
2020 Feb 12
5
[PATCH nbdkit 1/3] server: Rename global backend pointer to "top".
It's confusing to use the same terminology for a single backend as for
the linked list of backends. In particular it's often not clear if
we're calling the next backend or the whole chain of backends.
---
server/internal.h | 14 ++++++++++--
server/connections.c | 20 ++++++++---------
server/locks.c | 2 +-
server/main.c
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.
...This is the implementation of our handle in .open, and serves as
* a stable ‘void *nxdata’ in the filter API.
*/
-struct b_conn {
+struct b_h {
struct backend *b;
- struct connection *conn;
void *handle;
};
@@ -186,22 +186,22 @@ filter_config_complete (struct backend *b)
static int
next_preconnect (void *nxdata, int readonly)
{
- struct b_conn *b_conn = nxdata;
- return b_conn->b->preconnect (b_conn->b, b_conn->conn, readonly);
+ struct b_h *b_h = nxdata;
+ return b_h->b->preconnect (b_h->b, readonly);
}
static int
-filter_preconnect (struct backend *b, struct c...
2020 Feb 11
4
[PATCH nbdkit v2 0/3] server: Remove explicit connection parameter.
v1 was here:
https://www.redhat.com/archives/libguestfs/2020-February/msg00081.html
v2 replaces
struct connection *conn = GET_CONN;
with
GET_CONN;
which sets conn implicitly and asserts that it is non-NULL.
If we actually want to test if conn is non-NULL or behave
differently, then you must use threadlocal_get_conn() instead,
and some existing uses do that.
Rich.