summaryrefslogtreecommitdiffstats
path: root/source3/libsmb/clireadwrite.c
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/clireadwrite.c
parent3ada1c1a992172b92f695343a8648675583f7719 (diff)
downloadsamba-41b37207139b3cbfa293a84ab92113db8007afed.tar.gz
samba-41b37207139b3cbfa293a84ab92113db8007afed.tar.xz
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/clireadwrite.c')
-rw-r--r--source3/libsmb/clireadwrite.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c
index 8eac7d07d8b..60ac89aeb2a 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)) {