1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-11 16:58:40 +03:00

r2371: Fix for talking to OS/2 clients (max_mux ignored) by Guenter Kukkukk <guenter.kukkukk@kukkukk.com>.

Bugid #1590.
Jeremy.
This commit is contained in:
Jeremy Allison 2004-09-17 00:49:41 +00:00 committed by Gerald (Jerry) Carter
parent b910e53002
commit 330025d1a6
2 changed files with 8 additions and 1 deletions

View File

@ -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;

View File

@ -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)) {