summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-03-29 19:47:18 +0200
committerVolker Lendecke <vl@samba.org>2009-04-06 21:32:07 +0200
commit807328ce6d9dea481995a9f6e86f2b60f4ca4c00 (patch)
tree37c07b09e7c89de35c4f9b4493f8c231613b0d4f /source3/rpc_client
parent03becb506613b4ec1d365ff2bbd63e53b0847805 (diff)
downloadsamba-807328ce6d9dea481995a9f6e86f2b60f4ca4c00.tar.gz
samba-807328ce6d9dea481995a9f6e86f2b60f4ca4c00.tar.bz2
samba-807328ce6d9dea481995a9f6e86f2b60f4ca4c00.zip
Convert cli_tcon_andx to tevent_req
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/rpc_transport_smbd.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/source3/rpc_client/rpc_transport_smbd.c b/source3/rpc_client/rpc_transport_smbd.c
index c1cf9fb24e..5a5433fb1c 100644
--- a/source3/rpc_client/rpc_transport_smbd.c
+++ b/source3/rpc_client/rpc_transport_smbd.c
@@ -130,7 +130,7 @@ struct get_anon_ipc_state {
static void get_anon_ipc_negprot_done(struct tevent_req *subreq);
static void get_anon_ipc_sesssetup_done(struct tevent_req *subreq);
-static void get_anon_ipc_tcon_done(struct async_req *subreq);
+static void get_anon_ipc_tcon_done(struct tevent_req *subreq);
static struct async_req *get_anon_ipc_send(TALLOC_CTX *mem_ctx,
struct event_context *ev,
@@ -165,7 +165,6 @@ static void get_anon_ipc_negprot_done(struct tevent_req *subreq)
subreq, struct async_req);
struct get_anon_ipc_state *state = talloc_get_type_abort(
req->private_data, struct get_anon_ipc_state);
- struct tevent_req *subreq2;
NTSTATUS status;
status = cli_negprot_recv(subreq);
@@ -175,11 +174,11 @@ static void get_anon_ipc_negprot_done(struct tevent_req *subreq)
return;
}
- subreq2 = cli_session_setup_guest_send(state, state->ev, state->cli);
- if (async_req_nomem(subreq2, req)) {
+ subreq = cli_session_setup_guest_send(state, state->ev, state->cli);
+ if (async_req_nomem(subreq, req)) {
return;
}
- tevent_req_set_callback(subreq2, get_anon_ipc_sesssetup_done, req);
+ tevent_req_set_callback(subreq, get_anon_ipc_sesssetup_done, req);
}
static void get_anon_ipc_sesssetup_done(struct tevent_req *subreq)
@@ -188,7 +187,6 @@ static void get_anon_ipc_sesssetup_done(struct tevent_req *subreq)
subreq, struct async_req);
struct get_anon_ipc_state *state = talloc_get_type_abort(
req->private_data, struct get_anon_ipc_state);
- struct async_req *subreq2;
NTSTATUS status;
status = cli_session_setup_guest_recv(subreq);
@@ -198,19 +196,18 @@ static void get_anon_ipc_sesssetup_done(struct tevent_req *subreq)
return;
}
- subreq2 = cli_tcon_andx_send(state, state->ev, state->cli,
+ subreq = cli_tcon_andx_send(state, state->ev, state->cli,
"IPC$", "IPC", NULL, 0);
- if (async_req_nomem(subreq2, req)) {
+ if (async_req_nomem(subreq, req)) {
return;
}
- subreq2->async.fn = get_anon_ipc_tcon_done;
- subreq2->async.priv = req;
+ tevent_req_set_callback(subreq, get_anon_ipc_tcon_done, req);
}
-static void get_anon_ipc_tcon_done(struct async_req *subreq)
+static void get_anon_ipc_tcon_done(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);
NTSTATUS status;
status = cli_tcon_andx_recv(subreq);