Displaying 5 results from an estimated 5 matches for "nbd_unlocked_supports_uri".
2019 Jun 05
1
[libnbd PATCH] api: Add nbd_supports_tls
...t_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
+ return 0;
+#endif
+}
+
+/* NB: is_locked = false, may_set_error = false. */
int
nbd_unlocked_supports_uri (struct nbd_handle *h)
{
--
2.20.1
2019 Sep 17
1
Re: [PATCH libnbd 2/2] api: New API for reading NBD protocol.
...((h->gflags & NBD_FLAG_FIXED_NEWSTYLE) == 0)
> + h->protocol = "newstyle";
> + else
> + h->protocol = "newstyle-fixed";
Should work whether this lands before or after my set_handshake_flags patch.
> +++ b/lib/handle.c
> @@ -315,3 +315,15 @@ nbd_unlocked_supports_uri (struct nbd_handle *h)
> return 0;
> #endif
> }
> +
> +const char *
> +nbd_unlocked_get_protocol (struct nbd_handle *h)
> +{
> + /* I believe that if we reach the Connected or Closed permitted
> + * states, then the state machine must have set h->protocol. So...
2019 Sep 17
3
[PATCH libnbd 1/2] api: Add new API to read whether TLS was negotiated.
When LIBNBD_TLS_ALLOW is used we don't have a way to find out if TLS
was really negotiated. This adds a flag and a way to read it back.
Unfortunately there is no test yet, because LIBNBD_TLS_ALLOW is not
tested -- it really should be but requires quite a complicated set of
tests because ideally we'd like to find out whether it falls back
correctly for all supported servers.
---
TODO
2019 Sep 17
0
[PATCH libnbd 2/2] api: New API for reading NBD protocol.
...style.c
+++ b/generator/states-oldstyle.c
@@ -64,6 +64,8 @@
return 0;
}
+ h->protocol = "oldstyle";
+
SET_NEXT_STATE (%.READY);
return 0;
diff --git a/lib/handle.c b/lib/handle.c
index bc4206c..85d10cd 100644
--- a/lib/handle.c
+++ b/lib/handle.c
@@ -315,3 +315,15 @@ nbd_unlocked_supports_uri (struct nbd_handle *h)
return 0;
#endif
}
+
+const char *
+nbd_unlocked_get_protocol (struct nbd_handle *h)
+{
+ /* I believe that if we reach the Connected or Closed permitted
+ * states, then the state machine must have set h->protocol. So if
+ * this assertion is hit then it indica...
2019 Jun 03
3
[PATCH libnbd] api: nbd_get_version, nbd_supports_uri and nbd_get_package_name.
...d_close_callback cb, void *data)
pthread_mutex_unlock (&h->lock);
return ret;
}
+
+const char *
+nbd_unlocked_get_package_name (struct nbd_handle *h)
+{
+ return PACKAGE_NAME;
+}
+
+const char *
+nbd_unlocked_get_version (struct nbd_handle *h)
+{
+ return PACKAGE_VERSION;
+}
+
+int
+nbd_unlocked_supports_uri (struct nbd_handle *h)
+{
+#ifdef HAVE_LIBXML2
+ return 1;
+#else
+ return 0;
+#endif
+}
diff --git a/python/handle.c b/python/handle.c
index 7b5e139..7cff41a 100644
--- a/python/handle.c
+++ b/python/handle.c
@@ -89,28 +89,6 @@ free_aio_buffer (PyObject *capsule)
free (buf);
}
-PyObject *...