Displaying 20 results from an estimated 30 matches for "rcookies".
Did you mean:
cookies
2020 Sep 06
0
[libnbd PATCH 1/3] generator: Introduce REnum/RFlags return types
For now, there is no change to the generated code (although the man
pages are slightly improved), but this will make it easier for later
patches to improve OCaml and Golang bindings so that set/get pairs are
typed symmetrically.
---
generator/API.ml | 16 ++++++++++------
generator/API.mli | 2 ++
generator/C.ml | 20 ++++++++++++--------
generator/GoLang.ml | 13 ++++++++++++-
2019 Jul 30
0
[PATCH libnbd] examples: Fix theoretical cookie race in example.
There was a theoretic race in this example: If the server was very
fast at handling commands then it's possible that in a call such as:
cookie = nbd_aio_pread_callback (..., callback, ...);
buffers[i].cookie = cookie;
nbd_aio_pread_callback finished and calls the callback before
returning. buffers[i].cookie would therefore not be set, but the
callback() function was checking the list of
2019 Jul 17
2
Re: [PATCH libnbd v2] examples: Include an example of integrating with the glib main loop.
On 7/17/19 8:00 AM, Richard W.M. Jones wrote:
> ---
> .gitignore | 1 +
> README | 2 +
> configure.ac | 9 +
> examples/Makefile.am | 22 ++
> examples/glib-main-loop.c | 511 ++++++++++++++++++++++++++++++++++++++
> 5 files changed, 545 insertions(+)
Looks good.
>
> + revents = g_source_query_unix_fd
2019 Jul 17
2
[PATCH libnbd v2] examples: Include an example of integrating with glib main loop.
This is working now, and incorporates all of the changes in Eric's
review, *except* that it still doesn't retire commands (although this
seems to make no obvious difference, except possibly a performance and
memory impact).
Rich.
2019 Jul 30
4
[PATCH libnbd] examples: Fix theoretical cookie race in example.
Previously discussed here:
https://www.redhat.com/archives/libguestfs/2019-July/msg00213.html
It turns out that deferring callbacks is a PITA. (It would be a bit
easier if C has closures.) However by rewriting the example we can
avoid the need to use the cookie at all and make it run a bit more
efficiently, so let's do that instead.
Rich.
2020 Sep 06
8
[libnbd PATCH 0/3] Improve type-safety of ocaml/golang getters
Natural fallout after my recent testsuite additions that fixed a
couple of ocaml bugs in the setters. However, on at least the OCaml
code, I'm not sure what we should do if a newer libnbd ever returns a
bit that an older NBD.mli was not expecting at the time the OCaml
compiler ran (see below). I'm also not sure if there is a more
efficient way to avoid outputting Val_FOO() converters for
2019 Jul 17
0
[PATCH libnbd v2] examples: Include an example of integrating with the glib main loop.
---
.gitignore | 1 +
README | 2 +
configure.ac | 9 +
examples/Makefile.am | 22 ++
examples/glib-main-loop.c | 511 ++++++++++++++++++++++++++++++++++++++
5 files changed, 545 insertions(+)
diff --git a/.gitignore b/.gitignore
index ce02aef..9a8ba37 100644
--- a/.gitignore
+++ b/.gitignore
@@ -41,6 +41,7 @@ Makefile.in
2020 Sep 11
0
[libnbd PATCH v2 2/5] generator: Refactor filtering of accepted OFlags
Rather than having to open-code the list of accepted command flags in
the unlocked version of each command, we can store that information in
the generator to produce the check directly in the public API.
---
generator/API.ml | 53 +++++++++++++++++++++++++++++----------------
generator/API.mli | 3 ++-
generator/C.ml | 26 +++++++++++++++-------
generator/GoLang.ml | 10 ++++-----
2019 Jul 17
0
Re: [PATCH libnbd v2] examples: Include an example of integrating with the glib main loop.
On 7/17/19 8:40 AM, Eric Blake wrote:
>
> It may be possible in rare situations that the libnbd state machine can
> send() the command AND see data ready to recv() (perhaps from a previous
> command still in flight), where it ends up read()ing until blocking and
> happens to get the server's reply to this command and fire off the
> callback, all prior to the
2020 Sep 07
2
Re: [libnbd PATCH 1/3] generator: Introduce REnum/RFlags return types
On Sat, Sep 05, 2020 at 08:40:58PM -0500, Eric Blake wrote:
> diff --git a/generator/API.mli b/generator/API.mli
> index 712e837..e45b5c0 100644
> --- a/generator/API.mli
> +++ b/generator/API.mli
> @@ -78,6 +78,8 @@ and ret =
> | RString (** return a newly allocated string,
> caller frees, NULL for error *)
> | RUInt
2020 Mar 17
0
[PATCH libnbd v2 3/3] golang: Add straightforward bindings, without callbacks.
---
generator/GoLang.ml | 336 +++++++++++++++++-
.../libnbd/libnbd_200_connect_command_test.go | 35 ++
2 files changed, 367 insertions(+), 4 deletions(-)
diff --git a/generator/GoLang.ml b/generator/GoLang.ml
index 1b8f20b..e5fb97c 100644
--- a/generator/GoLang.ml
+++ b/generator/GoLang.ml
@@ -23,6 +23,304 @@ open Printf
open API
open Utils
+let go_name_of_arg =
2012 Jun 07
1
How to set cookies in RCurl
...Cookies disabled
3
4 Your browser currently does not accept cookies.\rCookies need to be
enabled for Scopus to function properly.\rPlease enable session cookies in
your browser and try again.
$`NULL`
V1 V2 V3
1
$`NULL`
V1
1 Cookies disabled
$`NULL`
V1
1
2
3
I have carefully read section 4.4. from this:
http://www.omegahat.org/RCurl/RC...
2019 Aug 31
1
[PATCH libnbd] Add bindings for Rust language
Still not working, but I took the latest patch and:
- rebased it against libnbd 1.0
- fixed it so it handles new args and cbargs
The generator now runs without warnings.
This patch doesn't handle optargs at all. In C these are converted to
non-optional parameter. Rust doesn't (AFAIK) have optional or
labelled arguments unfortunately.
Rich.
2020 Sep 06
0
[libnbd PATCH 3/3] ocaml: Typesafe returns for REnum/RFlags
Now that we have a distinct branch in the generator when returning an
enum or bitmask that cannot fail, we can use it in OCaml for symmetry,
so that the result of a get function can be plugged into a set
function without manual conversion of an integer.
While at it, add an abort() if OCaml ever hands us a value we can't
translate to a C int (that one is unreachable per OCaml type safety),
or
2020 Sep 07
0
[libnbd PATCH v2 3/3] ocaml: Typesafe returns for REnum/RFlags
Now that we have a distinct branch in the generator when returning an
enum or bitmask that cannot fail, we can use it in OCaml for symmetry,
so that the result of a get function can be plugged into a set
function without manual conversion of an integer. This includes the
use of the recently-added UNKNOWN catch-all for encoding C values
returned by a newer libnbd.so than when the OCaml bindings
2020 Sep 11
10
[libnbd PATCH v2 0/5] Add knobs for client- vs. server-side validation
In v2:
- now based on my proposal to add LIBNBD_SHUTDOWN_IMMEDIATE
- four flags instead of two: STRICT_FLAGS is new (patch 4),
and STRICT_BOUNDS is separate from STRICT_ZERO_SIZE (patch 5)
- various refactorings for more shared code and less duplication
Eric Blake (5):
api: Add xxx_MASK constant for each Flags type
generator: Refactor filtering of accepted OFlags
api: Add
2020 Sep 07
0
Re: [libnbd PATCH 1/3] generator: Introduce REnum/RFlags return types
On 9/7/20 9:13 AM, Richard W.M. Jones wrote:
>> +++ b/generator/C.ml
>> @@ -66,15 +66,15 @@ let errcode_of_ret =
>> function
>> | RBool | RErr | RFd | RInt | RInt64 | RCookie -> Some "-1"
>> | RStaticString | RString -> Some "NULL"
>> - | RUInt -> None (* errors not possible *)
>> + | RUInt | REnum (_) | RFlags
2019 Jul 24
0
[PATCH libnbd 2/3] lib: Implement closure lifetimes.
Previously closures had a crude flag which tells if they are
persistent or transient. Transient closures (flag = false) last for
the lifetime of the currently called libnbd function. Persistent
closures had an indefinite lifetime which could last for as long as
the handle. In language bindings handling persistent closures was
wasteful as we needed to register a "close callback" to
2020 Sep 07
1
Re: [libnbd PATCH 1/3] generator: Introduce REnum/RFlags return types
On Mon, Sep 07, 2020 at 09:38:15AM -0500, Eric Blake wrote:
> On 9/7/20 9:13 AM, Richard W.M. Jones wrote:
>
> >>+++ b/generator/C.ml
> >>@@ -66,15 +66,15 @@ let errcode_of_ret =
> >> function
> >> | RBool | RErr | RFd | RInt | RInt64 | RCookie -> Some "-1"
> >> | RStaticString | RString -> Some "NULL"
>
2019 Jul 24
0
[PATCH libnbd v2 2/5] lib: Implement closure lifetimes.
Previously closures had a crude flag which tells if they are
persistent or transient. Transient closures (flag = false) last for
the lifetime of the currently called libnbd function. Persistent
closures had an indefinite lifetime which could last for as long as
the handle. In language bindings handling persistent closures was
wasteful as we needed to register a "close callback" to