s4: Composite async callback on error conditions
Matthias Dieter Wallnöfer
mdw at samba.org
Sat Jan 15 14:12:35 MST 2011
Given the file "libcli/composite/composite.c":
> _PUBLIC_ void composite_error(struct composite_context *ctx, NTSTATUS
> status)
> {
> /* you are allowed to pass NT_STATUS_OK to composite_error(),
> in which
> case it is equivalent to composite_done() */
> if (NT_STATUS_IS_OK(status)) {
> composite_done(ctx);
> return;
> }
> if (!ctx->used_wait && !ctx->async.fn) {
> event_add_timed(ctx->event_ctx, ctx, timeval_zero(),
> composite_trigger, ctx);
> }
> ctx->status = status;
> ctx->state = COMPOSITE_STATE_ERROR;
> if (ctx->async.fn != NULL) {
> ctx->async.fn(ctx);
> }
> }
Regardless if an action succeeds (composite_done branch) or fails a
specified async callback is launched if it has been set. As far as I can
see this leads to problems: see
http://build.samba.org/build.cgi/build/50b21d3db7ff575c3bdac41bedc8d77ab74680a9
(access in talloc destructor).
So my question: should we still be running async callbacks also on
failure conditions? Or can this particular problem be solved differently?
Cheers,
Matthias
More information about the samba-technical
mailing list