Document the size constraints on a write request.
authorRichard Sharpe <sharpe@samba.org>
Wed, 1 Jan 2003 21:54:00 +0000 (21:54 +0000)
committerRichard Sharpe <sharpe@samba.org>
Wed, 1 Jan 2003 21:54:00 +0000 (21:54 +0000)
source/libsmb/clireadwrite.c

index 187a40cadec4709d5383ad2835c4043bf570bf6e..d35b0dfdfd96bd15df666031e481622ff0e737aa 100644 (file)
@@ -284,10 +284,13 @@ static BOOL cli_issue_write(struct cli_state *cli, int fnum, off_t offset, uint1
        SIVAL(cli->outbuf,smb_vwv5,0);
        SSVAL(cli->outbuf,smb_vwv7,mode);
 
+       SSVAL(cli->outbuf,smb_vwv8,(mode & 0x0008) ? size : 0);
        /*
-        * THe following is still wrong ...
+        * 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.
         */
-       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,