summaryrefslogtreecommitdiff
path: root/source3/rpc_client/ndr.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_client/ndr.c')
-rw-r--r--source3/rpc_client/ndr.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/source3/rpc_client/ndr.c b/source3/rpc_client/ndr.c
index 1db6ff7290..6433a7d196 100644
--- a/source3/rpc_client/ndr.c
+++ b/source3/rpc_client/ndr.c
@@ -33,15 +33,12 @@ static void cli_do_rpc_ndr_done(struct tevent_req *subreq);
struct tevent_req *cli_do_rpc_ndr_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct rpc_pipe_client *cli,
- const char *interface,
- uint32_t interface_version,
+ const struct ndr_interface_table *table,
uint32_t opnum,
void *r)
{
struct tevent_req *req, *subreq;
struct cli_do_rpc_ndr_state *state;
- struct ndr_syntax_id syntax;
- const struct ndr_interface_table *table;
struct ndr_push *push;
DATA_BLOB blob;
enum ndr_err_code ndr_err;
@@ -53,17 +50,6 @@ struct tevent_req *cli_do_rpc_ndr_send(TALLOC_CTX *mem_ctx,
return NULL;
}
- if (!ndr_syntax_from_string(interface, interface_version, &syntax)) {
- tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
- return tevent_req_post(req, ev);
- }
-
- table = get_iface_from_syntax(&syntax);
- if (table == NULL) {
- tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
- return tevent_req_post(req, ev);
- }
-
if (!ndr_syntax_id_equal(&table->syntax_id, &cli->abstract_syntax)
|| (opnum >= table->num_calls)) {
tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
@@ -170,7 +156,7 @@ NTSTATUS cli_do_rpc_ndr_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
NTSTATUS cli_do_rpc_ndr(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
- const char *interface, uint32_t interface_version,
+ const struct ndr_interface_table *table,
uint32_t opnum, void *r)
{
TALLOC_CTX *frame = talloc_stackframe();
@@ -184,8 +170,7 @@ NTSTATUS cli_do_rpc_ndr(struct rpc_pipe_client *cli,
goto fail;
}
- req = cli_do_rpc_ndr_send(frame, ev, cli, interface, interface_version,
- opnum, r);
+ req = cli_do_rpc_ndr_send(frame, ev, cli, table, opnum, r);
if (req == NULL) {
status = NT_STATUS_NO_MEMORY;
goto fail;