summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-07-07 18:01:28 +0200
committerStefan Metzmacher <metze@samba.org>2008-07-07 20:59:13 +0200
commita3ea8bcb195bb1e7b4cb22488a0993d55a95387d (patch)
tree25cf976309aa5b1335ea73a7b0e33098c2ec0209
parentefaf4cedb27f6ffade8c5212919ff08602bd3e7a (diff)
downloadsamba-a3ea8bcb195bb1e7b4cb22488a0993d55a95387d.tar.gz
samba-a3ea8bcb195bb1e7b4cb22488a0993d55a95387d.tar.bz2
samba-a3ea8bcb195bb1e7b4cb22488a0993d55a95387d.zip
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)
-rw-r--r--source4/librpc/rpc/dcerpc_smb.c9
1 files changed, 8 insertions, 1 deletions
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;