r24110: I hate seeing callers manually filling in the composite context. Use
authorAndrew Bartlett <abartlet@samba.org>
Wed, 1 Aug 2007 00:38:53 +0000 (00:38 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 20:01:25 +0000 (15:01 -0500)
the helper functions instead (and in kai's new code, which just copied
the previous bad practice).

Andrew Bartlett

source/winbind/wb_name2domain.c
source/winbind/wb_sid2domain.c

index b3f9f0c799ae2fe9b675b56a940c1d899fdb4791..b31ccb121261c7e0e23b577db00ae3006a4e3ffe 100644 (file)
@@ -59,8 +59,7 @@ struct composite_context *wb_name2domain_send(TALLOC_CTX *mem_ctx,
        ctx = wb_cmd_lookupname_send(state, service, user_dom, user_name);
        if (ctx == NULL) goto failed;
 
-       ctx->async.fn = name2domain_recv_sid;
-       ctx->async.private_data = state;
+       composite_continue(result, ctx, name2domain_recv_sid, ctx->async.private_data);
        return result;
 
 failed:
index d9c0fb2ef83db84630a6bafe37c8e27a64318f9e..de535cdcf91efa71a77f1f4533b7123745695bfc 100644 (file)
@@ -94,8 +94,8 @@ struct composite_context *wb_sid2domain_send(TALLOC_CTX *mem_ctx,
 
        ctx = wb_cmd_lookupsid_send(state, service, state->sid);
        if (ctx == NULL) goto failed;
-       ctx->async.fn = sid2domain_recv_name;
-       ctx->async.private_data = state;
+       composite_continue(result, ctx, sid2domain_recv_name, ctx->async.private_data);
+
        return result;
 
  failed: