summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-09-17 00:49:41 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:52:41 -0500
commit41b37207139b3cbfa293a84ab92113db8007afed (patch)
tree079a18a87be2a664d7238777999ddbf96c316435 /source3/libsmb
parent3ada1c1a992172b92f695343a8648675583f7719 (diff)
downloadsamba-41b37207139b3cbfa293a84ab92113db8007afed.tar.gz
samba-41b37207139b3cbfa293a84ab92113db8007afed.tar.bz2
samba-41b37207139b3cbfa293a84ab92113db8007afed.zip
r2371: Fix for talking to OS/2 clients (max_mux ignored) by Guenter Kukkukk <guenter.kukkukk@kukkukk.com>.
Bugid #1590. Jeremy. (This used to be commit 330025d1a669de927a3879a9c3a9fc20e1be464f)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/cliconnect.c1
-rw-r--r--source3/libsmb/clireadwrite.c8
2 files changed, 8 insertions, 1 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index 559538aac9..98656c119d 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -1133,6 +1133,7 @@ BOOL cli_negprot(struct cli_state *cli)
cli->use_spnego = False;
cli->sec_mode = SVAL(cli->inbuf,smb_vwv1);
cli->max_xmit = SVAL(cli->inbuf,smb_vwv2);
+ cli->max_mux = SVAL(cli->inbuf, smb_vwv3);
cli->sesskey = IVAL(cli->inbuf,smb_vwv6);
cli->serverzone = SVALS(cli->inbuf,smb_vwv10);
cli->serverzone *= 60;
diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c
index 8eac7d07d8..60ac89aeb2 100644
--- a/source3/libsmb/clireadwrite.c
+++ b/source3/libsmb/clireadwrite.c
@@ -325,10 +325,16 @@ ssize_t cli_write(struct cli_state *cli,
int bwritten = 0;
int issued = 0;
int received = 0;
- int mpx = MAX(cli->max_mux-1, 1);
+ int mpx = 1;
int block = cli->max_xmit - (smb_size+32);
int blocks = (size + (block-1)) / block;
+ if(cli->max_mux == 0) {
+ mpx = 1;
+ } else {
+ mpx = cli->max_mux-1;
+ }
+
while (received < blocks) {
while ((issued - received < mpx) && (issued < blocks)) {