Displaying 5 results from an estimated 5 matches for "c1decb2".
2019 Aug 13
1
Re: [PATCH libnbd v2 3/3] api: Add nbd_clear_debug_callback.
...callback if one was previously associated
> +with the handle (with C<nbd_set_debug_callback>). If not
s/not/no/
> +callback was associated this does nothing.";
> };
>
> "set_handle_name", {
> diff --git a/lib/debug.c b/lib/debug.c
> index ad4d9cb..c1decb2 100644
> --- a/lib/debug.c
> +++ b/lib/debug.c
> @@ -38,13 +38,24 @@ nbd_unlocked_get_debug (struct nbd_handle *h)
> return h->debug;
> }
>
> +int
> +nbd_unlocked_clear_debug_callback (struct nbd_handle *h)
> +{
> + if (h->debug_callback)
> + /* igno...
2019 Aug 13
0
[PATCH libnbd v2 3/3] api: Add nbd_clear_debug_callback.
...uot;;
+ longdesc = "\
+Remove the debug callback if one was previously associated
+with the handle (with C<nbd_set_debug_callback>). If not
+callback was associated this does nothing.";
};
"set_handle_name", {
diff --git a/lib/debug.c b/lib/debug.c
index ad4d9cb..c1decb2 100644
--- a/lib/debug.c
+++ b/lib/debug.c
@@ -38,13 +38,24 @@ nbd_unlocked_get_debug (struct nbd_handle *h)
return h->debug;
}
+int
+nbd_unlocked_clear_debug_callback (struct nbd_handle *h)
+{
+ if (h->debug_callback)
+ /* ignore return value */
+ h->debug_callback (LIBNBD_CA...
2019 Aug 13
7
[PATCH libnbd v2 0/3] Implement OClosures.
v1 was here:
https://www.redhat.com/archives/libguestfs/2019-August/msg00168.html
I pushed uncontroversial patches 1-4
v2:
- The implementation of OClosure (new patch 1) in Python is fixed.
- Patch 2 (old patch 5) is unchanged.
- I added a new API for removing debug callbacks. I think this
approach has some advantages over using OClosure.
- I didn't yet do any work on changing the
2019 Aug 13
0
[PATCH libnbd 1/4] api: Combine callback and user_data into a single struct.
...NULL, 0, 0, 0, NULL);
+ if (cmd->cb.completion.callback)
+ cmd->cb.completion.callback (LIBNBD_CALLBACK_FREE,
+ cmd->cb.completion.user_data,
+ NULL);
free (cmd);
}
diff --git a/lib/debug.c b/lib/debug.c
index c1decb2..7753394 100644
--- a/lib/debug.c
+++ b/lib/debug.c
@@ -41,23 +41,22 @@ nbd_unlocked_get_debug (struct nbd_handle *h)
int
nbd_unlocked_clear_debug_callback (struct nbd_handle *h)
{
- if (h->debug_callback)
+ if (h->debug_callback.callback)
/* ignore return value */
- h->debug_...
2019 Aug 13
8
[PATCH libnbd 0/4] Add free function to callbacks.
Patches 1 & 2 are rather complex, but the end result is that we pass
closures + user_data + free function in single struct parameters as I
described previously in this email:
https://www.redhat.com/archives/libguestfs/2019-August/msg00210.html
Patch 3 adds a convenient FREE_CALLBACK macro which seems a worthwhile
simplification if you buy into 1 & 2.
Patch 4 adds another macro which is