diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-08-24 17:39:58 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-08-25 01:39:41 +0200 |
commit | d4aa8978ccecc40e3fd4fb89e76199b82ddf87ff (patch) | |
tree | 5c288db4e7b93ebf8efe708dd0360f58dd058ccd /source4/winbind/wb_irpc.c | |
parent | 0ccdaa940a80181d1f263386324668a0a715dbf9 (diff) | |
download | samba-d4aa8978ccecc40e3fd4fb89e76199b82ddf87ff.tar.gz samba-d4aa8978ccecc40e3fd4fb89e76199b82ddf87ff.tar.bz2 samba-d4aa8978ccecc40e3fd4fb89e76199b82ddf87ff.zip |
s4:winbind: convert wb_update_rodc_dns_send/recv to tevent_req
metze
Diffstat (limited to 'source4/winbind/wb_irpc.c')
-rw-r--r-- | source4/winbind/wb_irpc.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/source4/winbind/wb_irpc.c b/source4/winbind/wb_irpc.c index 6c060d9434..628114e404 100644 --- a/source4/winbind/wb_irpc.c +++ b/source4/winbind/wb_irpc.c @@ -79,7 +79,7 @@ struct wb_irpc_DsrUpdateReadOnlyServerDnsRecords_state { struct winbind_DsrUpdateReadOnlyServerDnsRecords *req; }; -static void wb_irpc_DsrUpdateReadOnlyServerDnsRecords_callback(struct composite_context *ctx); +static void wb_irpc_DsrUpdateReadOnlyServerDnsRecords_callback(struct tevent_req *subreq); static NTSTATUS wb_irpc_DsrUpdateReadOnlyServerDnsRecords(struct irpc_message *msg, struct winbind_DsrUpdateReadOnlyServerDnsRecords *req) @@ -87,7 +87,7 @@ static NTSTATUS wb_irpc_DsrUpdateReadOnlyServerDnsRecords(struct irpc_message *m struct wbsrv_service *service = talloc_get_type(msg->private_data, struct wbsrv_service); struct wb_irpc_DsrUpdateReadOnlyServerDnsRecords_state *s; - struct composite_context *ctx; + struct tevent_req *subreq; DEBUG(5, ("wb_irpc_DsrUpdateReadOnlyServerDnsRecords called\n")); @@ -97,25 +97,30 @@ static NTSTATUS wb_irpc_DsrUpdateReadOnlyServerDnsRecords(struct irpc_message *m s->msg = msg; s->req = req; - ctx = wb_update_rodc_dns_send(msg, service, req); - NT_STATUS_HAVE_NO_MEMORY(ctx); + subreq = wb_update_rodc_dns_send(s, + service->task->event_ctx, + service, req); + NT_STATUS_HAVE_NO_MEMORY(subreq); - ctx->async.fn = wb_irpc_DsrUpdateReadOnlyServerDnsRecords_callback; - ctx->async.private_data = s; + tevent_req_set_callback(subreq, + wb_irpc_DsrUpdateReadOnlyServerDnsRecords_callback, + s); msg->defer_reply = true; return NT_STATUS_OK; } -static void wb_irpc_DsrUpdateReadOnlyServerDnsRecords_callback(struct composite_context *ctx) +static void wb_irpc_DsrUpdateReadOnlyServerDnsRecords_callback(struct tevent_req *subreq) { - struct wb_irpc_DsrUpdateReadOnlyServerDnsRecords_state *s = talloc_get_type(ctx->async.private_data, - struct wb_irpc_DsrUpdateReadOnlyServerDnsRecords_state); + struct wb_irpc_DsrUpdateReadOnlyServerDnsRecords_state *s = + tevent_req_callback_data(subreq, + struct wb_irpc_DsrUpdateReadOnlyServerDnsRecords_state); NTSTATUS status; DEBUG(5, ("wb_irpc_DsrUpdateReadOnlyServerDnsRecords_callback called\n")); - status = wb_update_rodc_dns_recv(ctx, s, s->req); + status = wb_update_rodc_dns_recv(subreq, s, s->req); + TALLOC_FREE(subreq); irpc_send_reply(s->msg, status); } |