summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-03-15 09:54:23 +0100
committerVolker Lendecke <vl@samba.org>2009-04-06 21:32:07 +0200
commitc23ccff13a6e92b37a104845736e5e8cecd27f35 (patch)
tree48d61f7e4d5ccf9578fe86d8b35f8bcaf1c8d905 /source3/rpc_client
parentca7cd350a6ac47b981d6c9a8b671f4c18642a9f2 (diff)
downloadsamba-c23ccff13a6e92b37a104845736e5e8cecd27f35.tar.gz
samba-c23ccff13a6e92b37a104845736e5e8cecd27f35.tar.bz2
samba-c23ccff13a6e92b37a104845736e5e8cecd27f35.zip
Convert cli_read_andx to tevent_req
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/rpc_transport_np.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/source3/rpc_client/rpc_transport_np.c b/source3/rpc_client/rpc_transport_np.c
index e6de8396a8..cc8f2e17c6 100644
--- a/source3/rpc_client/rpc_transport_np.c
+++ b/source3/rpc_client/rpc_transport_np.c
@@ -119,7 +119,7 @@ struct rpc_np_read_state {
ssize_t received;
};
-static void rpc_np_read_done(struct async_req *subreq);
+static void rpc_np_read_done(struct tevent_req *subreq);
static struct tevent_req *rpc_np_read_send(TALLOC_CTX *mem_ctx,
struct event_context *ev,
@@ -128,8 +128,7 @@ static struct tevent_req *rpc_np_read_send(TALLOC_CTX *mem_ctx,
{
struct rpc_transport_np_state *np_transport = talloc_get_type_abort(
priv, struct rpc_transport_np_state);
- struct tevent_req *req;
- struct async_req *subreq;
+ struct tevent_req *req, *subreq;
struct rpc_np_read_state *state;
req = tevent_req_create(mem_ctx, &state, struct rpc_np_read_state);
@@ -144,18 +143,17 @@ static struct tevent_req *rpc_np_read_send(TALLOC_CTX *mem_ctx,
if (subreq == NULL) {
goto fail;
}
- subreq->async.fn = rpc_np_read_done;
- subreq->async.priv = req;
+ tevent_req_set_callback(subreq, rpc_np_read_done, req);
return req;
fail:
TALLOC_FREE(req);
return NULL;
}
-static void rpc_np_read_done(struct async_req *subreq)
+static void rpc_np_read_done(struct tevent_req *subreq)
{
- struct tevent_req *req = talloc_get_type_abort(
- subreq->async.priv, struct tevent_req);
+ struct tevent_req *req = tevent_req_callback_data(
+ subreq, struct tevent_req);
struct rpc_np_read_state *state = tevent_req_data(
req, struct rpc_np_read_state);
NTSTATUS status;