summaryrefslogtreecommitdiff
path: root/source3/rpc_client/ndr.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-08-21 12:20:33 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:30:08 -0500
commit18a48df488f5fcf9b55abf61b09778bdc15373d7 (patch)
treec91a46e312cb7e9d93ad7d41b2baf1f6a58e9ad4 /source3/rpc_client/ndr.c
parent644b43d993db7ec709a2bc4e121426e7a27237e8 (diff)
downloadsamba-18a48df488f5fcf9b55abf61b09778bdc15373d7.tar.gz
samba-18a48df488f5fcf9b55abf61b09778bdc15373d7.tar.bz2
samba-18a48df488f5fcf9b55abf61b09778bdc15373d7.zip
r24594: pass down the ndr_interface_table in the samba3 client bindings
instead of the pull and push functions metze (This used to be commit 5e3d4df9bca069708d72f548dc5ddfc7708ac122)
Diffstat (limited to 'source3/rpc_client/ndr.c')
-rw-r--r--source3/rpc_client/ndr.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/source3/rpc_client/ndr.c b/source3/rpc_client/ndr.c
index 86d75ab024..c7044aa7d9 100644
--- a/source3/rpc_client/ndr.c
+++ b/source3/rpc_client/ndr.c
@@ -22,24 +22,29 @@
#include "includes.h"
-NTSTATUS cli_do_rpc_ndr(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- int p_idx, int opnum, void *data,
- ndr_pull_flags_fn_t pull_fn, ndr_push_flags_fn_t push_fn)
+NTSTATUS cli_do_rpc_ndr(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx, int p_idx,
+ const struct ndr_interface_table *table,
+ uint32 opnum, void *r)
{
prs_struct q_ps, r_ps;
+ const struct ndr_interface_call *call;
struct ndr_pull *pull;
DATA_BLOB blob;
struct ndr_push *push;
NTSTATUS status;
SMB_ASSERT(cli->pipe_idx == p_idx);
+ SMB_ASSERT(table->num_calls > opnum);
+
+ call = &table->calls[opnum];
push = ndr_push_init_ctx(mem_ctx);
if (!push) {
return NT_STATUS_NO_MEMORY;
}
- status = push_fn(push, NDR_IN, data);
+ status = call->ndr_push(push, NDR_IN, r);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
@@ -80,7 +85,7 @@ NTSTATUS cli_do_rpc_ndr(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
/* have the ndr parser alloc memory for us */
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
- status = pull_fn(pull, NDR_OUT, data);
+ status = call->ndr_pull(pull, NDR_OUT, r);
talloc_free(pull);
if (!NT_STATUS_IS_OK(status)) {