search for: cb

Displaying 20 results from an estimated 2112 matches for "cb".

Did you mean: cbs
2019 Aug 13
0
[PATCH libnbd 3/4] lib: Add FREE_CALLBACK macro.
...7 100644 --- a/generator/states-reply-simple.c +++ b/generator/states-reply-simple.c @@ -69,9 +69,7 @@ cmd->offset, LIBNBD_READ_DATA, &error) == -1) cmd->error = error ? error : EPROTO; - if (cmd->cb.fn.chunk.free) - cmd->cb.fn.chunk.free (cmd->cb.fn.chunk.user_data); - cmd->cb.fn.chunk.callback = NULL; /* because we've freed it */ + FREE_CALLBACK (cmd->cb.fn.chunk); } SET_NEXT_STATE (%^FINISH_COMMAND); diff --git a/generator/states-reply-structured....
2004 Feb 19
1
read codebook function
...time it is executed, the patter is not there anymore and there are only 8 BCV in my file. function fReadBits1 is the same as the ogg's read bit function. orry for the long function and to bother Adriano <p> -------------- next part -------------- int cOgg::readCodeBook(tOggCodebook *cb) { dword i, curEntry, num; byte curLength; // read sync pattern this->fRead((byte*) cb->sync, 3); cb->sync[3] = '\0'; // print info printf("Codebook sync pattern: %s\n", cb->sync); // check if pattern is valid if( strncmp(cb->sync, "BCV", 3) ) return...
2016 Mar 25
2
Unable to join DC to domain
...to smb.conf)." 1) These are new Ubuntu VMs, not cloned, built from scratch. I tried joining them with no smb.conf in /usr/local/samba/etc You have disabled SELinux too 2) AFAIK Ubuntu uses apparmor, not selinux. I have not disabled apparmor. 3) --show-deleted reveals a single instance of cbadc02: twerks at filer:~$ sudo /usr/local/samba/bin/ldbsearch -H /usr/local/samba/private/sam.ldb --cross-ncs --show-deleted > ldbsearch_cross-ncs_deleted.txt itwerks at filer:~$ cat ldbsearch_cross-ncs_deleted.txt | grep cbadc dNSHostName: cbadc02.cb.cliffbells.com dNSHostName: cbadc01.cb.cliff...
2016 Mar 21
2
Unable to join DC to domain
No dice. Logged in to a workstation with RSAT installed. Added computer to OU Domain Controllers, closed ADUC, attempted join again. itwerks at cbadc03:~$ kinit Administrator Password for Administrator at CB.CLIFFBELLS.COM: itwerks at cbadc03:~$ klist -e Ticket cache: FILE:/tmp/krb5cc_1000 Default principal: Administrator at CB.CLIFFBELLS.COM Valid starting Expires Service principal 03/21/2016 17:21:42 03/22/2016 03:21:42...
2019 Aug 14
2
[libnbd PATCH] lib: Consolidate free callbacks to just happen at retire time
When we introduced valid_flags, there was an incentive to do as few callbacks as possible, favoring cb(VALID|FREE) calls over the sequence cb(VALID);cb(FREE). To make it work, we set .callback=NULL after an early free, so that the later check during retirement didn't free again. But now that our .free callback is distinct from our other callbacks, there is no longer an advantage to bundling th...
2016 Mar 27
0
Unable to join DC to domain
Good times... Spent hours today rolling a fresh VM. FAIL itwerks at testes:~$ kinit administrator Password for administrator at CB.CLIFFBELLS.COM: itwerks at testes:~$ klist -e Ticket cache: FILE:/tmp/krb5cc_1000 Default principal: administrator at CB.CLIFFBELLS.COM Valid starting Expires Service principal 03/27/2016 00:07:04 03/27/2016 10:07:04 krbtgt/ CB.CLIFFBELLS.COM at CB.CLIFFBELLS.COM renew...
2016 Mar 21
4
Unable to join DC to domain
I cannot join two new VMs to my domain, I receive the following error on both machines: twerks at cbadc03:~$ kinit Administrator Password for Administrator at CB.CLIFFBELLS.COM: itwerks at cbadc03:~$ klist -e Ticket cache: FILE:/tmp/krb5cc_1000 Default principal: Administrator at CB.CLIFFBELLS.COM Valid starting Expires Service principal 03/21/2016 00:19:56 03/21/2016 10:19:56...
2019 Aug 15
0
[PATCH libnbd v2 04/10] lib: Permit .callback = NULL, .free != NULL.
...persistent buffer, but we don't need the associated completion callback to be actually called. --- docs/libnbd.pod | 15 +++++++++++++++ lib/internal.h | 18 +++++++++--------- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/docs/libnbd.pod b/docs/libnbd.pod index f6fd4cd..d230cb4 100644 --- a/docs/libnbd.pod +++ b/docs/libnbd.pod @@ -643,6 +643,21 @@ S<C<chunk.callback = my_fn>> function is called. The free function is only accessible in the C API as it is not needed in garbage collected programming languages. +=head2 Callbacks with C<.callback=NULL>...
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
2019 Aug 15
2
Re: [PATCH libnbd v2 04/10] lib: Permit .callback = NULL, .free != NULL.
...lib/internal.h | 18 +++++++++--------- > 2 files changed, 24 insertions(+), 9 deletions(-) > > +++ b/lib/internal.h > @@ -274,20 +274,20 @@ struct command { > }; > > /* Test if a callback is "null" or not, and set it to null. */ > -#define CALLBACK_IS_NULL(cb) ((cb).callback == NULL) > +#define CALLBACK_IS_NULL(cb) ((cb).callback == NULL && (cb).free == NULL) Semantic change. In generator, you used CALLBACK_IS_NULL() for both Closure and OClosure. For OClosure, the new semantics are still correct. But for Closure, we now no longer...
2019 Aug 03
1
[PATCH libnbd] generator: Generate typedefs automatically for Closure arguments.
...void *debug_callback_user_data); (Previously typedefs were available, but they were written by hand and only used internally to the library.) This change necessitates that we uniquely name all of our closures across methods (the same-named closure is required to have the same cbargs). I took this opportunity to rename some, so especially completion callbacks now have the type nbd_completion_callback. The generator also checks they are named uniquely. This does not change the C API or ABI. --- generator/generator | 93 +++++++++++++++++++++++------ gener...
2016 Mar 27
2
Unable to join DC to domain
I ran ldbsearch on my sam.ldb I searched for CBADC02, CBADC03, and TESTES (all VMs that fail to join domain), results are below: CBADC02 shows up a few times: # record 1906 dn: CN=CBADC02\0ADEL:de85228c-f92b-4d5d-9d6a-01c3f915dec9,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configu$ objectClass: top objectClass: server instanceType: 4 w...
2019 Aug 12
0
[PATCH libnbd 4/7] lib: Allow closure user_data to be associated with a free callback.
...simple.c +++ b/generator/states-reply-simple.c @@ -69,6 +69,7 @@ cmd->data, cmd->count, cmd->offset, LIBNBD_READ_DATA, &error) == -1) cmd->error = error ? error : EPROTO; + nbd_internal_free_callback (h, cmd->cb.fn_user_data); cmd->cb.fn.chunk = NULL; /* because we've freed it */ } diff --git a/generator/states-reply-structured.c b/generator/states-reply-structured.c index cdd9f10..b016cd7 100644 --- a/generator/states-reply-structured.c +++ b/generator/states-reply-structured.c @@ -31...
2019 Aug 15
0
Re: [libnbd PATCH] lib: Consolidate free callbacks to just happen at retire time
On Wed, Aug 14, 2019 at 05:38:31PM -0500, Eric Blake wrote: > When we introduced valid_flags, there was an incentive to do as few > callbacks as possible, favoring cb(VALID|FREE) calls over the sequence > cb(VALID);cb(FREE). To make it work, we set .callback=NULL after an > early free, so that the later check during retirement didn't free > again. > > But now that our .free callback is distinct from our other callbacks, > there is no long...
2019 Aug 15
13
[PATCH libnbd v2 00/10] Callbacks and OCaml and Python persistent buffers.
This is a combination of these two earlier series: https://www.redhat.com/archives/libguestfs/2019-August/msg00235.html https://www.redhat.com/archives/libguestfs/2019-August/msg00240.html plus changes to allow .callback = NULL / .free != NULL, and to reduce the complexity of freeing callbacks. Although it's rather long there's nothing complex here. We might consider squashing some
2019 Aug 15
0
[PATCH libnbd v2 02/10] lib: Add macros to check if a callback is "null" or not, and set it to null.
...8c99e0 100755 --- a/generator/generator +++ b/generator/generator @@ -3576,7 +3576,7 @@ let generate_lib_api_c () = let value = match errcode with | Some value -> value | None -> assert false in - pr " if (%s_callback.callback == NULL) {\n" cbname; + pr " if (CALLBACK_IS_NULL (%s_callback)) {\n" cbname; pr " set_error (EFAULT, \"%%s cannot be NULL\", \"%s\");\n" cbname; pr " ret = %s;\n" value; pr " goto out;\n"; @@ -3689,7 +3689,7...
2019 Aug 13
0
[PATCH libnbd 1/4] api: Combine callback and user_data into a single struct.
...goto error; diff --git a/generator/generator b/generator/generator index 4d3d7ad..ea32929 100755 --- a/generator/generator +++ b/generator/generator @@ -3226,10 +3226,7 @@ let rec print_arg_list ?(handle = false) ?(types = true) args optargs = pr "%s" len | Closure { cbname; cbargs } -> if types then pr "nbd_%s_callback " cbname; - pr "%s_callback" cbname; - pr ", "; - if types then pr "void *"; - pr "%s_user_data" cbname + pr "%s_callback" cbname...
2019 Aug 13
0
[PATCH libnbd 2/4] api: Add free function and remove valid_flag parameter.
...2929..553c4b8 100755 --- a/generator/generator +++ b/generator/generator @@ -3067,7 +3067,7 @@ module C : sig val generate_docs_libnbd_api_pod : unit -> unit val print_arg_list : ?handle:bool -> ?types:bool -> arg list -> optarg list -> unit - val print_cbarg_list : ?valid_flag:bool -> ?types:bool -> cbarg list -> unit + val print_cbarg_list : ?types:bool -> cbarg list -> unit val errcode_of_ret : ret -> string option val type_of_ret : ret -> string end = struct @@ -3284,13 +3284,8 @@ let print_extern name args optargs re...
2019 Aug 13
0
[PATCH libnbd 4/4] lib: Add CALL_CALLBACK macro.
...3 deletions(-) diff --git a/generator/states-reply-simple.c b/generator/states-reply-simple.c index 8905367..8e3d7f1 100644 --- a/generator/states-reply-simple.c +++ b/generator/states-reply-simple.c @@ -64,10 +64,10 @@ int error = 0; assert (cmd->error == 0); - if (cmd->cb.fn.chunk.callback (cmd->cb.fn.chunk.user_data, - cmd->data, cmd->count, - cmd->offset, LIBNBD_READ_DATA, - &error) == -1) + if (CALL_CALLBACK (cmd->cb.fn.chunk, +...
2019 Jul 25
0
[libnbd PATCH] lib: Reduce number of read/block_status callbacks
...BNBD_CALLBACK_FREE; + return valid; +} + +/*----- End of prologue. -----*/ + /* STATE MACHINE */ { REPLY.STRUCTURED_REPLY.START: /* We've only read the simple_reply. The structured_reply is longer, @@ -293,16 +306,19 @@ } if (cmd->type == NBD_CMD_READ && cmd->cb.fn.read) { int scratch = error; + unsigned valid = valid_flags (h); /* Different from successful reads: inform the callback about the * current error rather than any earlier one. If the callback fails * without setting errno, then use the server's e...