summaryrefslogtreecommitdiff
path: root/source3/librpc/rpc
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-07-20 11:04:31 +0200
committerVolker Lendecke <vl@samba.org>2008-07-20 17:37:11 +0200
commit1335da2a7cc639310e5d389e8e8dbe67c4e7ca25 (patch)
treeccc12b50a8eb04039345c082168c9cc823696b05 /source3/librpc/rpc
parent18fb7e09776e26dacfa2329607f8a20699ad2969 (diff)
downloadsamba-1335da2a7cc639310e5d389e8e8dbe67c4e7ca25.tar.gz
samba-1335da2a7cc639310e5d389e8e8dbe67c4e7ca25.tar.bz2
samba-1335da2a7cc639310e5d389e8e8dbe67c4e7ca25.zip
Refactoring: Change calling conventions for cli_rpc_pipe_open_noauth
Pass in ndr_syntax_id instead of pipe_idx, return NTSTATUS (This used to be commit 9abc9dc4dc13bd3e42f98eff64eacf24b51f5779)
Diffstat (limited to 'source3/librpc/rpc')
-rw-r--r--source3/librpc/rpc/dcerpc.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/source3/librpc/rpc/dcerpc.c b/source3/librpc/rpc/dcerpc.c
index c8bca8d3eb..58d676a9d9 100644
--- a/source3/librpc/rpc/dcerpc.c
+++ b/source3/librpc/rpc/dcerpc.c
@@ -131,7 +131,6 @@ _PUBLIC_ NTSTATUS dcerpc_pipe_connect(TALLOC_CTX *parent_ctx, struct dcerpc_pipe
struct dcerpc_pipe *p = talloc(parent_ctx, struct dcerpc_pipe);
struct dcerpc_binding *binding;
NTSTATUS nt_status;
- int idx;
nt_status = dcerpc_parse_binding(p, binding_string, &binding);
@@ -165,16 +164,10 @@ _PUBLIC_ NTSTATUS dcerpc_pipe_connect(TALLOC_CTX *parent_ctx, struct dcerpc_pipe
return nt_status;
}
- idx = cli_get_pipe_idx(&table->syntax_id);
- if (idx < 0) {
- DEBUG(0, ("Unable to find interface index"));
- talloc_free(p);
- return NT_STATUS_OBJECT_PATH_INVALID;
- }
-
- p->rpc_cli = cli_rpc_pipe_open_noauth(p->cli, idx, &nt_status);
+ nt_status = cli_rpc_pipe_open_noauth(p->cli, &table->syntax_id,
+ &p->rpc_cli);
- if (p->rpc_cli == NULL) {
+ if (!NT_STATUS_IS_OK(nt_status)) {
talloc_free(p);
return nt_status;
}