diff options
author | Stefan Metzmacher <metze@samba.org> | 2010-03-10 10:01:57 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2010-03-12 15:25:46 +0100 |
commit | 6ecae51e18ef31010ba5cdac845e13108e821c40 (patch) | |
tree | 4f24154d4f310de694e0c1e2bd5d5d0a355c11dd /source4 | |
parent | 765d4a52cba49ac1c8d30ae825c03f6003acd188 (diff) | |
download | samba-6ecae51e18ef31010ba5cdac845e13108e821c40.tar.gz samba-6ecae51e18ef31010ba5cdac845e13108e821c40.tar.bz2 samba-6ecae51e18ef31010ba5cdac845e13108e821c40.zip |
s4:winbind/wb_cmd_usersids.c: make use of use tevent_req based dcerpc_binding_handle stubs
metze
Diffstat (limited to 'source4')
-rw-r--r-- | source4/winbind/wb_cmd_usersids.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/source4/winbind/wb_cmd_usersids.c b/source4/winbind/wb_cmd_usersids.c index c062d362b4..da4cb80c7b 100644 --- a/source4/winbind/wb_cmd_usersids.c +++ b/source4/winbind/wb_cmd_usersids.c @@ -47,7 +47,7 @@ struct cmd_usersids_state { static void usersids_recv_domgroups(struct composite_context *ctx); static void usersids_recv_domain(struct composite_context *ctx); -static void usersids_recv_aliases(struct rpc_request *req); +static void usersids_recv_aliases(struct tevent_req *subreq); struct composite_context *wb_cmd_usersids_send(TALLOC_CTX *mem_ctx, struct wbsrv_service *service, @@ -102,7 +102,7 @@ static void usersids_recv_domain(struct composite_context *ctx) struct cmd_usersids_state *state = talloc_get_type(ctx->async.private_data, struct cmd_usersids_state); - struct rpc_request *req; + struct tevent_req *subreq; struct wbsrv_domain *domain; uint32_t i; @@ -126,19 +126,23 @@ static void usersids_recv_domain(struct composite_context *ctx) state->r.in.sids = &state->lsa_sids; state->r.out.rids = &state->rids; - req = dcerpc_samr_GetAliasMembership_send(domain->libnet_ctx->samr.pipe, state, - &state->r); - composite_continue_rpc(state->ctx, req, usersids_recv_aliases, state); + subreq = dcerpc_samr_GetAliasMembership_r_send(state, + state->ctx->event_ctx, + domain->libnet_ctx->samr.pipe->binding_handle, + &state->r); + if (composite_nomem(subreq, state->ctx)) return; + tevent_req_set_callback(subreq, usersids_recv_aliases, state); } -static void usersids_recv_aliases(struct rpc_request *req) +static void usersids_recv_aliases(struct tevent_req *subreq) { struct cmd_usersids_state *state = - talloc_get_type(req->async.private_data, - struct cmd_usersids_state); + tevent_req_callback_data(subreq, + struct cmd_usersids_state); uint32_t i; - state->ctx->status = dcerpc_samr_GetAliasMembership_recv(req); + state->ctx->status = dcerpc_samr_GetAliasMembership_r_recv(subreq, state); + TALLOC_FREE(subreq); if (!composite_is_ok(state->ctx)) return; state->ctx->status = state->r.out.result; if (!composite_is_ok(state->ctx)) return; |