summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2010-07-30 13:12:35 -0400
committerSimo Sorce <idra@samba.org>2010-07-30 14:55:28 -0400
commit4c64e4d4af3403559b370381d7f14a83a39adfa7 (patch)
tree4a4cd97dd4250297f219fd5b041c062ddf20f355 /source3/rpc_client
parent3469fbc5e4098e798a03d14fece24fde2b60d9b9 (diff)
downloadsamba-4c64e4d4af3403559b370381d7f14a83a39adfa7.tar.gz
samba-4c64e4d4af3403559b370381d7f14a83a39adfa7.tar.bz2
samba-4c64e4d4af3403559b370381d7f14a83a39adfa7.zip
s3-dceprc: Improve dcerpc_guess_sizes() interface
Make it possible to pass in the NDR padding size so that theoretically client and server code can decide to use a different alignment. Pass in the header length as a parameter so that this function can be used for different type of packets. Make sure padding size will not make the fragment exceed the maximum length. Calculate padding taking in account the header length.
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_pipe.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index 99e856dfd8..2bb9aad9e3 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -1286,8 +1286,10 @@ static NTSTATUS prepare_next_frag(struct rpc_api_pipe_req_state *state,
data_left = state->req_data->length - state->req_data_sent;
- status = dcerpc_guess_sizes(state->cli->auth, data_left,
+ status = dcerpc_guess_sizes(state->cli->auth,
+ DCERPC_REQUEST_LENGTH, data_left,
state->cli->max_xmit_frag,
+ CLIENT_NDR_PADDING_SIZE,
&data_sent_thistime,
&frag_len, &auth_len, &pad_len);
if (!NT_STATUS_IS_OK(status)) {