diff options
Diffstat (limited to 'source3/rpc_client/rpc_transport_smbd.c')
-rw-r--r-- | source3/rpc_client/rpc_transport_smbd.c | 23 |
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); |