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,