mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
rpc: Simplify dcerpc_binding_handle_raw_call()
Align it with dcerpc_binding_handle_call() Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jose A. Rivera <jarrpa@samba.org> Autobuild-User(master): José A. Rivera <jarrpa@samba.org> Autobuild-Date(master): Fri Jun 19 20:17:24 CEST 2015 on sn-devel-104
This commit is contained in:
parent
893b5f8144
commit
f89e9bd47b
@ -224,7 +224,7 @@ NTSTATUS dcerpc_binding_handle_raw_call(struct dcerpc_binding_handle *h,
|
||||
TALLOC_CTX *frame = talloc_stackframe();
|
||||
struct tevent_context *ev;
|
||||
struct tevent_req *subreq;
|
||||
NTSTATUS status;
|
||||
NTSTATUS status = NT_STATUS_NO_MEMORY;
|
||||
|
||||
/*
|
||||
* TODO: allow only one sync call
|
||||
@ -236,8 +236,7 @@ NTSTATUS dcerpc_binding_handle_raw_call(struct dcerpc_binding_handle *h,
|
||||
ev = samba_tevent_context_init(frame);
|
||||
}
|
||||
if (ev == NULL) {
|
||||
talloc_free(frame);
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
subreq = dcerpc_binding_handle_raw_call_send(frame, ev,
|
||||
@ -246,13 +245,11 @@ NTSTATUS dcerpc_binding_handle_raw_call(struct dcerpc_binding_handle *h,
|
||||
in_data,
|
||||
in_length);
|
||||
if (subreq == NULL) {
|
||||
talloc_free(frame);
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (!tevent_req_poll_ntstatus(subreq, ev, &status)) {
|
||||
talloc_free(frame);
|
||||
return status;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
status = dcerpc_binding_handle_raw_call_recv(subreq,
|
||||
@ -260,13 +257,9 @@ NTSTATUS dcerpc_binding_handle_raw_call(struct dcerpc_binding_handle *h,
|
||||
out_data,
|
||||
out_length,
|
||||
out_flags);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
talloc_free(frame);
|
||||
return status;
|
||||
}
|
||||
|
||||
fail:
|
||||
TALLOC_FREE(frame);
|
||||
return NT_STATUS_OK;
|
||||
return status;
|
||||
}
|
||||
|
||||
struct dcerpc_binding_handle_disconnect_state {
|
||||
|
Loading…
Reference in New Issue
Block a user