diff options
author | Volker Lendecke <vl@samba.org> | 2009-11-08 19:38:01 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-11-08 19:43:47 +0100 |
commit | e181b889784e6aed47e2fcc86add736d0b04daf2 (patch) | |
tree | 2bf46748bfa1eb83756d7ebce645304c6b4555dd /source3/rpc_client | |
parent | 27847e8386a005b4369d99cad62215a113a0a0f9 (diff) | |
download | samba-e181b889784e6aed47e2fcc86add736d0b04daf2.tar.gz samba-e181b889784e6aed47e2fcc86add736d0b04daf2.tar.bz2 samba-e181b889784e6aed47e2fcc86add736d0b04daf2.zip |
Revert "s3: Do not reference ndr_table_<pipe> in the cli_ routines directly"
This reverts commit daa964013bc5d036f4da571ce22c0052ef40943a.
Diffstat (limited to 'source3/rpc_client')
-rw-r--r-- | source3/rpc_client/ndr.c | 21 |
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; |