summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorHerb Lewis <herb@samba.org>2002-12-19 20:26:44 +0000
committerHerb Lewis <herb@samba.org>2002-12-19 20:26:44 +0000
commit41969738a4d5244b73864dd882d214ff8824365b (patch)
tree460bc4bff4123935021d008270e3661ee0ce7537 /source3/libsmb
parentd81a04b410636ad206fe4ae0970e148d9ef13f84 (diff)
downloadsamba-41969738a4d5244b73864dd882d214ff8824365b.tar.gz
samba-41969738a4d5244b73864dd882d214ff8824365b.tar.bz2
samba-41969738a4d5244b73864dd882d214ff8824365b.zip
merge from 2.2 fix for smbclient large files
(This used to be commit 17f685fdbf5d36f82e3da0a09457f5e248b3f109)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/clireadwrite.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c
index 38e8aac42a..7780c93cc4 100644
--- a/source3/libsmb/clireadwrite.c
+++ b/source3/libsmb/clireadwrite.c
@@ -29,10 +29,15 @@ Issue a single SMBread and don't wait for a reply.
static BOOL cli_issue_read(struct cli_state *cli, int fnum, off_t offset,
size_t size, int i)
{
+ BOOL bigoffset = False;
+
memset(cli->outbuf,'\0',smb_size);
memset(cli->inbuf,'\0',smb_size);
- set_message(cli->outbuf,10,0,True);
+ if ((SMB_BIG_UINT)offset >> 32)
+ bigoffset = True;
+
+ set_message(cli->outbuf,bigoffset ? 12 : 10,0,True);
SCVAL(cli->outbuf,smb_com,SMBreadX);
SSVAL(cli->outbuf,smb_tid,cli->cnum);
@@ -45,6 +50,9 @@ static BOOL cli_issue_read(struct cli_state *cli, int fnum, off_t offset,
SSVAL(cli->outbuf,smb_vwv6,size);
SSVAL(cli->outbuf,smb_mid,cli->mid + i);
+ if (bigoffset)
+ SIVAL(cli->outbuf,smb_vwv10,(offset>>32) & 0xffffffff);
+
return cli_send_smb(cli);
}