summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-03-10 10:23:01 +0100
committerStefan Metzmacher <metze@samba.org>2010-03-12 15:25:48 +0100
commit7b76c118ad0f5272a2dac679e482f7b1b2440abc (patch)
treea52e89b4da6ca0c5c0eccf7187c34e1f387b728b /source4
parent398f477941de2fe3010c4f44b5507a9b764c2fd3 (diff)
downloadsamba-7b76c118ad0f5272a2dac679e482f7b1b2440abc.tar.gz
samba-7b76c118ad0f5272a2dac679e482f7b1b2440abc.tar.bz2
samba-7b76c118ad0f5272a2dac679e482f7b1b2440abc.zip
s4:librpc/rpc/dcerpc_util.c: make use of use tevent_req based dcerpc_binding_handle stubs
metze
Diffstat (limited to 'source4')
-rw-r--r--source4/librpc/rpc/dcerpc_util.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c
index f540d62cb9..768a3864a1 100644
--- a/source4/librpc/rpc/dcerpc_util.c
+++ b/source4/librpc/rpc/dcerpc_util.c
@@ -124,7 +124,7 @@ struct epm_map_binding_state {
static void continue_epm_recv_binding(struct composite_context *ctx);
-static void continue_epm_map(struct rpc_request *req);
+static void continue_epm_map(struct tevent_req *subreq);
/*
@@ -133,12 +133,11 @@ static void continue_epm_map(struct rpc_request *req);
*/
static void continue_epm_recv_binding(struct composite_context *ctx)
{
- struct rpc_request *map_req;
-
struct composite_context *c = talloc_get_type(ctx->async.private_data,
struct composite_context);
struct epm_map_binding_state *s = talloc_get_type(c->private_data,
struct epm_map_binding_state);
+ struct tevent_req *subreq;
/* receive result of rpc pipe connect request */
c->status = dcerpc_pipe_connect_b_recv(ctx, c, &s->pipe);
@@ -160,25 +159,28 @@ static void continue_epm_recv_binding(struct composite_context *ctx)
s->r.out.entry_handle = &s->handle;
/* send request for an endpoint mapping - a rpc request on connected pipe */
- map_req = dcerpc_epm_Map_send(s->pipe, c, &s->r);
- if (composite_nomem(map_req, c)) return;
+ subreq = dcerpc_epm_Map_r_send(s, c->event_ctx,
+ s->pipe->binding_handle,
+ &s->r);
+ if (composite_nomem(subreq, c)) return;
- composite_continue_rpc(c, map_req, continue_epm_map, c);
+ tevent_req_set_callback(subreq, continue_epm_map, c);
}
/*
Stage 3 of epm_map_binding: Receive endpoint mapping and provide binding details
*/
-static void continue_epm_map(struct rpc_request *req)
+static void continue_epm_map(struct tevent_req *subreq)
{
- struct composite_context *c = talloc_get_type(req->async.private_data,
- struct composite_context);
+ struct composite_context *c = tevent_req_callback_data(subreq,
+ struct composite_context);
struct epm_map_binding_state *s = talloc_get_type(c->private_data,
struct epm_map_binding_state);
/* receive result of a rpc request */
- c->status = dcerpc_epm_Map_recv(req);
+ c->status = dcerpc_epm_Map_r_recv(subreq, s);
+ TALLOC_FREE(subreq);
if (!composite_is_ok(c)) return;
/* check the details */