diff options
Diffstat (limited to 'source3/libsmb/clireadwrite.c')
-rw-r--r-- | source3/libsmb/clireadwrite.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c index 0715aa7f1a..187a40cade 100644 --- a/source3/libsmb/clireadwrite.c +++ b/source3/libsmb/clireadwrite.c @@ -248,8 +248,7 @@ ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, si issue a single SMBwrite and don't wait for a reply ****************************************************************************/ -static BOOL cli_issue_write(struct cli_state *cli, int fnum, off_t offset, - uint16 mode, const char *buf, +static BOOL cli_issue_write(struct cli_state *cli, int fnum, off_t offset, uint16 mode, char *buf, size_t size, int i) { char *p; @@ -285,13 +284,10 @@ static BOOL cli_issue_write(struct cli_state *cli, int fnum, off_t offset, SIVAL(cli->outbuf,smb_vwv5,0); SSVAL(cli->outbuf,smb_vwv7,mode); - SSVAL(cli->outbuf,smb_vwv8,(mode & 0x0008) ? size : 0); /* - * According to CIFS-TR-1p00, this following field should only - * be set if CAP_LARGE_WRITEX is set. We should check this - * locally. However, this check might already have been - * done by our callers. + * THe following is still wrong ... */ + SSVAL(cli->outbuf,smb_vwv8,(mode & 0x0008) ? size : 0); SSVAL(cli->outbuf,smb_vwv9,((size>>16)&1)); SSVAL(cli->outbuf,smb_vwv10,size); SSVAL(cli->outbuf,smb_vwv11, @@ -320,7 +316,7 @@ static BOOL cli_issue_write(struct cli_state *cli, int fnum, off_t offset, ssize_t cli_write(struct cli_state *cli, int fnum, uint16 write_mode, - const char *buf, off_t offset, size_t size) + char *buf, off_t offset, size_t size) { int bwritten = 0; int issued = 0; |