diff options
author | Jeremy Allison <jra@samba.org> | 2002-03-20 01:43:06 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-03-20 01:43:06 +0000 |
commit | 5e09ffdc7cfbbf06720af55101512ca88fac7ea2 (patch) | |
tree | 25db7599d936fef3ea3e9026da291ce186c6945d | |
parent | 418d5684a2845d914ad1266bb38e68bc7e2de43a (diff) | |
download | samba-5e09ffdc7cfbbf06720af55101512ca88fac7ea2.tar.gz samba-5e09ffdc7cfbbf06720af55101512ca88fac7ea2.tar.bz2 samba-5e09ffdc7cfbbf06720af55101512ca88fac7ea2.zip |
Test against W2K that we're doing large read/writes correctly (we are).
At least with 14 word writes.
Jeremy.
(This used to be commit 24ef6258a16e6b4673f1088d64b79bddcd268df5)
-rw-r--r-- | source3/libsmb/clireadwrite.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c index 627bab88a5..402de726e8 100644 --- a/source3/libsmb/clireadwrite.c +++ b/source3/libsmb/clireadwrite.c @@ -223,6 +223,14 @@ static BOOL cli_issue_write(struct cli_state *cli, int fnum, off_t offset, uint1 { char *p; + if (size > cli->bufsize) { + cli->outbuf = realloc(cli->outbuf, size + 1024); + cli->inbuf = realloc(cli->inbuf, size + 1024); + if (cli->outbuf == NULL || cli->inbuf == NULL) + return False; + cli->bufsize = size + 1024; + } + memset(cli->outbuf,'\0',smb_size); memset(cli->inbuf,'\0',smb_size); @@ -300,6 +308,7 @@ ssize_t cli_write(struct cli_state *cli, break; bwritten += SVAL(cli->inbuf, smb_vwv2); + bwritten += (((int)(SVAL(cli->inbuf, smb_vwv4)))>>16); } while (received < issued && cli_receive_smb(cli)) |