diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2009-01-21 14:07:38 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-01-21 14:07:38 +0100 |
commit | 1d59fd4d733007ccabb69c945e1da2208c376b96 (patch) | |
tree | c9e7cd077b232c781ba1fc28f326998fba6669e0 /source3/rpc_client | |
parent | b64b78e4cc2aaed779a07dbcb180323bfb3652d6 (diff) | |
parent | 11a25f90500b64f4b43907f6f311dc5e9731da39 (diff) | |
download | samba-1d59fd4d733007ccabb69c945e1da2208c376b96.tar.gz samba-1d59fd4d733007ccabb69c945e1da2208c376b96.tar.bz2 samba-1d59fd4d733007ccabb69c945e1da2208c376b96.zip |
Merge branch 'v4-0-test' of /home/jelmer/samba4
Diffstat (limited to 'source3/rpc_client')
-rw-r--r-- | source3/rpc_client/cli_pipe.c | 39 | ||||
-rw-r--r-- | source3/rpc_client/ndr.c | 2 |
2 files changed, 40 insertions, 1 deletions
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c index 0a606f2438..6e2ffc933b 100644 --- a/source3/rpc_client/cli_pipe.c +++ b/source3/rpc_client/cli_pipe.c @@ -4170,3 +4170,42 @@ NTSTATUS cli_get_session_key(TALLOC_CTX *mem_ctx, return NT_STATUS_OK; } + +/** + * Create a new RPC client context which uses a local dispatch function. + */ +NTSTATUS rpc_pipe_open_internal(TALLOC_CTX *mem_ctx, const struct ndr_syntax_id *abstract_syntax, + NTSTATUS (*dispatch) (struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const struct ndr_interface_table *table, uint32_t opnum, void *r), + struct auth_serversupplied_info *serversupplied_info, + struct rpc_pipe_client **presult) +{ + struct rpc_pipe_client *result; + + result = TALLOC_ZERO_P(mem_ctx, struct rpc_pipe_client); + if (result == NULL) { + return NT_STATUS_NO_MEMORY; + } + + result->transport_type = NCACN_INTERNAL; + + result->abstract_syntax = *abstract_syntax; + result->transfer_syntax = ndr_transfer_syntax; + result->dispatch = dispatch; + + result->pipes_struct = TALLOC_ZERO_P(mem_ctx, pipes_struct); + if (result->pipes_struct == NULL) { + TALLOC_FREE(result); + return NT_STATUS_NO_MEMORY; + } + result->pipes_struct->mem_ctx = mem_ctx; + result->pipes_struct->server_info = serversupplied_info; + result->pipes_struct->pipe_bound = true; + + result->max_xmit_frag = -1; + result->max_recv_frag = -1; + + *presult = result; + return NT_STATUS_OK; +} + + diff --git a/source3/rpc_client/ndr.c b/source3/rpc_client/ndr.c index 9c3205eca3..6c40f09ab8 100644 --- a/source3/rpc_client/ndr.c +++ b/source3/rpc_client/ndr.c @@ -25,7 +25,7 @@ NTSTATUS cli_do_rpc_ndr(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const struct ndr_interface_table *table, - uint32 opnum, void *r) + uint32_t opnum, void *r) { prs_struct q_ps, r_ps; const struct ndr_interface_call *call; |