search for: e40b274

Displaying 3 results from an estimated 3 matches for "e40b274".

Did you mean: 140274
2019 Jun 05
1
[libnbd PATCH] api: Add nbd_supports_tls
...supports_tls (nbd) != 1) { + fprintf (stderr, "skip: compiled without TLS supports\n"); + exit (77); + } if (nbd_set_tls (nbd, 2) == -1) { fprintf (stderr, "%s\n", nbd_get_error ()); exit (EXIT_FAILURE); diff --git a/lib/handle.c b/lib/handle.c index cc311ba..e40b274 100644 --- a/lib/handle.c +++ b/lib/handle.c @@ -227,6 +227,18 @@ nbd_unlocked_get_version (struct nbd_handle *h) return PACKAGE_VERSION; } +/* NB: is_locked = false, may_set_error = false. */ +int +nbd_unlocked_supports_tls (struct nbd_handle *h) +{ +#ifdef HAVE_GNUTLS + return 1; +#else +...
2019 Jun 08
0
[PATCH libnbd v3] lib: Atomically update h->state when leaving the locked region.
...!nbd_internal_is_state_dead (get_state (h))) { + while (!nbd_internal_is_state_closed (get_next_state (h)) && + !nbd_internal_is_state_dead (get_next_state (h))) { if (nbd_unlocked_poll (h, -1) == -1) return -1; } diff --git a/lib/handle.c b/lib/handle.c index e40b274..300eac7 100644 --- a/lib/handle.c +++ b/lib/handle.c @@ -57,7 +57,7 @@ nbd_create (void) s = getenv ("LIBNBD_DEBUG"); h->debug = s && strcmp (s, "1") == 0; - h->state = STATE_START; + h->state = h->public_state = STATE_START; h->pid = -1;...
2019 Jun 08
4
[PATCH libnbd v3] lib: Atomically update h->state when leaving the locked region.
v1 was here: https://www.redhat.com/archives/libguestfs/2019-June/thread.html#00055 v2 was here: https://www.redhat.com/archives/libguestfs/2019-June/thread.html#00067 v3: - Fix atomicly -> atomically in commit message. - Fix a comment. - Fix TOCTTOU: There is now an inline function generated called <name>_is_permitted_state, and this is called twice, first outside the