From 41969738a4d5244b73864dd882d214ff8824365b Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Thu, 19 Dec 2002 20:26:44 +0000 Subject: merge from 2.2 fix for smbclient large files (This used to be commit 17f685fdbf5d36f82e3da0a09457f5e248b3f109) --- source3/libsmb/clireadwrite.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'source3/libsmb') 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); } -- cgit