From a3ea8bcb195bb1e7b4cb22488a0993d55a95387d Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 7 Jul 2008 18:01:28 +0200 Subject: dcerpc_smb: trans->in.max_data should not depend on the smb max size We now support async multi fragment SMBtrans calls. metze (This used to be commit 6813e22e9d300696a40993476629227d5cc4d35f) --- source4/librpc/rpc/dcerpc_smb.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source4') diff --git a/source4/librpc/rpc/dcerpc_smb.c b/source4/librpc/rpc/dcerpc_smb.c index 26fe433b09..312a44a5f0 100644 --- a/source4/librpc/rpc/dcerpc_smb.c +++ b/source4/librpc/rpc/dcerpc_smb.c @@ -254,6 +254,7 @@ static NTSTATUS smb_send_trans_request(struct dcerpc_connection *c, DATA_BLOB *b struct smb_trans2 *trans; uint16_t setup[2]; struct smb_trans_state *state; + uint16_t max_data; state = talloc(smb, struct smb_trans_state); if (state == NULL) { @@ -270,8 +271,14 @@ static NTSTATUS smb_send_trans_request(struct dcerpc_connection *c, DATA_BLOB *b setup[0] = TRANSACT_DCERPCCMD; setup[1] = smb->fnum; + if (c->srv_max_xmit_frag > 0) { + max_data = MIN(UINT16_MAX, c->srv_max_xmit_frag); + } else { + max_data = UINT16_MAX; + } + trans->in.max_param = 0; - trans->in.max_data = smb_raw_max_trans_data(smb->tree, 0); + trans->in.max_data = max_data; trans->in.max_setup = 0; trans->in.setup_count = 2; trans->in.flags = 0; -- cgit