summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-03-29 20:00:58 +0200
committerVolker Lendecke <vl@samba.org>2009-04-06 21:32:07 +0200
commitca7cd350a6ac47b981d6c9a8b671f4c18642a9f2 (patch)
tree38989acd99ebb4029b6e0f107099b3828a8f4ab1 /source3/rpc_client
parent807328ce6d9dea481995a9f6e86f2b60f4ca4c00 (diff)
downloadsamba-ca7cd350a6ac47b981d6c9a8b671f4c18642a9f2.tar.gz
samba-ca7cd350a6ac47b981d6c9a8b671f4c18642a9f2.tar.bz2
samba-ca7cd350a6ac47b981d6c9a8b671f4c18642a9f2.zip
Convert cli_ntcreate to tevent_req
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/rpc_transport_np.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/source3/rpc_client/rpc_transport_np.c b/source3/rpc_client/rpc_transport_np.c
index 2a277a2462..e6de8396a8 100644
--- a/source3/rpc_client/rpc_transport_np.c
+++ b/source3/rpc_client/rpc_transport_np.c
@@ -278,14 +278,15 @@ struct rpc_transport_np_init_state {
struct rpc_transport_np_state *transport_np;
};
-static void rpc_transport_np_init_pipe_open(struct async_req *subreq);
+static void rpc_transport_np_init_pipe_open(struct tevent_req *subreq);
struct async_req *rpc_transport_np_init_send(TALLOC_CTX *mem_ctx,
struct event_context *ev,
struct cli_state *cli,
const struct ndr_syntax_id *abstract_syntax)
{
- struct async_req *result, *subreq;
+ struct async_req *result;
+ struct tevent_req *subreq;
struct rpc_transport_np_init_state *state;
if (!async_req_setup(mem_ctx, &result, &state,
@@ -315,8 +316,8 @@ struct async_req *rpc_transport_np_init_send(TALLOC_CTX *mem_ctx,
if (subreq == NULL) {
goto fail;
}
- subreq->async.fn = rpc_transport_np_init_pipe_open;
- subreq->async.priv = result;
+ tevent_req_set_callback(subreq, rpc_transport_np_init_pipe_open,
+ result);
return result;
fail:
@@ -324,10 +325,10 @@ struct async_req *rpc_transport_np_init_send(TALLOC_CTX *mem_ctx,
return NULL;
}
-static void rpc_transport_np_init_pipe_open(struct async_req *subreq)
+static void rpc_transport_np_init_pipe_open(struct tevent_req *subreq)
{
- struct async_req *req = talloc_get_type_abort(
- subreq->async.priv, struct async_req);
+ struct async_req *req = tevent_req_callback_data(
+ subreq, struct async_req);
struct rpc_transport_np_init_state *state = talloc_get_type_abort(
req->private_data, struct rpc_transport_np_init_state);
NTSTATUS status;