diff options
author | Stefan Metzmacher <metze@samba.org> | 2014-01-30 19:06:28 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2014-02-13 11:54:15 +0100 |
commit | 870a06aadd56d8c9a88e0d2392afe28bd082d1ec (patch) | |
tree | e4771b6b0311b0e11853ba7b74d3f41e44a31bd3 /source4/torture/rpc | |
parent | cef6b2d9d756723b7dcc8272cfaab4cddf66d1ae (diff) | |
download | samba-870a06aadd56d8c9a88e0d2392afe28bd082d1ec.tar.gz samba-870a06aadd56d8c9a88e0d2392afe28bd082d1ec.tar.xz samba-870a06aadd56d8c9a88e0d2392afe28bd082d1ec.zip |
s4:torture/rpc: make use of dcerpc_binding_set_*() in torture_rpc_connection_transport()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r-- | source4/torture/rpc/rpc.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/source4/torture/rpc/rpc.c b/source4/torture/rpc/rpc.c index 2ec55b68ead..0e27a6e8646 100644 --- a/source4/torture/rpc/rpc.c +++ b/source4/torture/rpc/rpc.c @@ -105,21 +105,32 @@ NTSTATUS torture_rpc_connection_transport(struct torture_context *tctx, NTSTATUS status; struct dcerpc_binding *binding; + *p = NULL; + status = torture_rpc_binding(tctx, &binding); - if (NT_STATUS_IS_ERR(status)) + if (!NT_STATUS_IS_OK(status)) { return status; + } - binding->transport = transport; - binding->assoc_group_id = assoc_group_id; + status = dcerpc_binding_set_transport(binding, transport); + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + status = dcerpc_binding_set_assoc_group_id(binding, assoc_group_id); + if (!NT_STATUS_IS_OK(status)) { + return status; + } status = dcerpc_pipe_connect_b(tctx, p, binding, table, - cmdline_credentials, tctx->ev, tctx->lp_ctx); - - if (NT_STATUS_IS_ERR(status)) { + cmdline_credentials, + tctx->ev, tctx->lp_ctx); + if (!NT_STATUS_IS_OK(status)) { *p = NULL; + return status; } - return status; + return NT_STATUS_OK; } static bool torture_rpc_setup_machine_workstation(struct torture_context *tctx, |