1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-02 09:47:23 +03:00

rpc_client: Simplify get_complete_frag_got_rest()

tevent_req_simple_finish_ntstatus() is made precisely for this simple
case where we just pass on a subreq's NTSTATUS

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2021-08-06 12:14:23 +02:00 committed by Jeremy Allison
parent f8c828b87d
commit 68a3e478d1

View File

@ -357,17 +357,8 @@ static void get_complete_frag_got_header(struct tevent_req *subreq)
static void get_complete_frag_got_rest(struct tevent_req *subreq)
{
struct tevent_req *req = tevent_req_callback_data(
subreq, struct tevent_req);
NTSTATUS status;
status = rpc_read_recv(subreq);
TALLOC_FREE(subreq);
if (!NT_STATUS_IS_OK(status)) {
tevent_req_nterror(req, status);
return;
}
tevent_req_done(req);
NTSTATUS status = rpc_read_recv(subreq);
return tevent_req_simple_finish_ntstatus(subreq, status);
}
static NTSTATUS get_complete_frag_recv(struct tevent_req *req)