From e181b889784e6aed47e2fcc86add736d0b04daf2 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 8 Nov 2009 19:38:01 +0100 Subject: Revert "s3: Do not reference ndr_table_ in the cli_ routines directly" This reverts commit daa964013bc5d036f4da571ce22c0052ef40943a. --- source3/rpc_client/ndr.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'source3/rpc_client/ndr.c') 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; -- cgit