summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-03-08 07:11:13 +0000
committerAndrew Tridgell <tridge@samba.org>2004-03-08 07:11:13 +0000
commit14591dc0eaa8751e8eb982d4157862e8ab8f2841 (patch)
treebcb3a05ee76113a05f79094088baec523a0aefb3 /source4
parent2622eaeca67edd0ff23ff34fc65b8db1f1d2fe83 (diff)
downloadsamba-14591dc0eaa8751e8eb982d4157862e8ab8f2841.tar.gz
samba-14591dc0eaa8751e8eb982d4157862e8ab8f2841.tar.bz2
samba-14591dc0eaa8751e8eb982d4157862e8ab8f2841.zip
fixed two writex client bugs
- always use the 14 word writex varient even for small transfers as long as large offsets are negotiated (this matches windows behaviour) - make sure we fill in the top 16 bits of the count for large writex calls (This used to be commit 9ea20d0c9a1cb4800f3f54195cbbe70c98c8e423)
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/raw/rawreadwrite.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/libcli/raw/rawreadwrite.c b/source4/libcli/raw/rawreadwrite.c
index 84c7e3c00f..3aa95c35aa 100644
--- a/source4/libcli/raw/rawreadwrite.c
+++ b/source4/libcli/raw/rawreadwrite.c
@@ -40,7 +40,7 @@ struct cli_request *smb_raw_read_send(struct cli_tree *tree, union smb_read *par
return NULL;
case RAW_READ_READBRAW:
- if (parms->readbraw.in.offset >= 0x80000000) {
+ if (tree->session->transport->negotiate.capabilities & CAP_LARGE_FILES) {
bigoffset = True;
}
SETUP_REQUEST(SMBreadbraw, bigoffset? 10:8, 0);
@@ -72,7 +72,7 @@ struct cli_request *smb_raw_read_send(struct cli_tree *tree, union smb_read *par
break;
case RAW_READ_READX:
- if (parms->readx.in.offset >= 0x80000000) {
+ if (tree->session->transport->negotiate.capabilities & CAP_LARGE_FILES) {
bigoffset = True;
}
SETUP_REQUEST(SMBreadX, bigoffset ? 12 : 10, 0);
@@ -232,7 +232,7 @@ struct cli_request *smb_raw_write_send(struct cli_tree *tree, union smb_write *p
break;
case RAW_WRITE_WRITEX:
- if (parms->writex.in.offset >= 0x80000000) {
+ if (tree->session->transport->negotiate.capabilities & CAP_LARGE_FILES) {
bigoffset = True;
}
SETUP_REQUEST(SMBwriteX, bigoffset ? 14 : 12, parms->writex.in.count);
@@ -243,7 +243,7 @@ struct cli_request *smb_raw_write_send(struct cli_tree *tree, union smb_write *p
SIVAL(req->out.vwv, VWV(5), 0); /* reserved */
SSVAL(req->out.vwv, VWV(7), parms->writex.in.wmode);
SSVAL(req->out.vwv, VWV(8), parms->writex.in.remaining);
- SSVAL(req->out.vwv, VWV(9), 0); /* reserved */
+ SSVAL(req->out.vwv, VWV(9), parms->writex.in.count>>16);
SSVAL(req->out.vwv, VWV(10), parms->writex.in.count);
SSVAL(req->out.vwv, VWV(11), PTR_DIFF(req->out.data, req->out.hdr));
if (bigoffset) {