summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-04-05 20:51:52 +0200
committerVolker Lendecke <vl@samba.org>2009-04-06 21:32:06 +0200
commit7ef78bd7b5b5d1b2c5c06d1170f80ea77f036353 (patch)
tree699ffaebaadd736b2097e5be8dce74d0ceb752c9 /source3/rpc_client
parentdec928e884f492c7a5e5e8c87e2ff0c1944da5f1 (diff)
downloadsamba-7ef78bd7b5b5d1b2c5c06d1170f80ea77f036353.tar.gz
samba-7ef78bd7b5b5d1b2c5c06d1170f80ea77f036353.tar.bz2
samba-7ef78bd7b5b5d1b2c5c06d1170f80ea77f036353.zip
Convert cli_trans 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 8b45cb4e9c..2a277a2462 100644
--- a/source3/rpc_client/rpc_transport_np.c
+++ b/source3/rpc_client/rpc_transport_np.c
@@ -204,7 +204,7 @@ struct rpc_np_trans_state {
uint32_t rdata_len;
};
-static void rpc_np_trans_done(struct async_req *subreq);
+static void rpc_np_trans_done(struct tevent_req *subreq);
static struct tevent_req *rpc_np_trans_send(TALLOC_CTX *mem_ctx,
struct event_context *ev,
@@ -214,8 +214,7 @@ static struct tevent_req *rpc_np_trans_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_trans_state *state;
req = tevent_req_create(mem_ctx, &state, struct rpc_np_trans_state);
@@ -233,8 +232,7 @@ static struct tevent_req *rpc_np_trans_send(TALLOC_CTX *mem_ctx,
if (subreq == NULL) {
goto fail;
}
- subreq->async.fn = rpc_np_trans_done;
- subreq->async.priv = req;
+ tevent_req_set_callback(subreq, rpc_np_trans_done, req);
return req;
fail:
@@ -242,10 +240,10 @@ static struct tevent_req *rpc_np_trans_send(TALLOC_CTX *mem_ctx,
return NULL;
}
-static void rpc_np_trans_done(struct async_req *subreq)
+static void rpc_np_trans_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_trans_state *state = tevent_req_data(
req, struct rpc_np_trans_state);
NTSTATUS status;