diff options
Diffstat (limited to 'source3/libsmb/clireadwrite.c')
-rw-r--r-- | source3/libsmb/clireadwrite.c | 8 |
1 files changed, 7 insertions, 1 deletions
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)) { |