summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-08-23 23:15:18 +0000
committerAndrew Tridgell <tridge@samba.org>2001-08-23 23:15:18 +0000
commitf3c1c25b97254c89e637e14d535ba97e1717e76c (patch)
treeb1d77462895f79f47e0d92607e4e74c762ff81ae
parent0055ee8cdc61d2ec1ca914cedb1f753b820c3bd5 (diff)
downloadsamba-f3c1c25b97254c89e637e14d535ba97e1717e76c.tar.gz
samba-f3c1c25b97254c89e637e14d535ba97e1717e76c.tar.bz2
samba-f3c1c25b97254c89e637e14d535ba97e1717e76c.zip
use 32 bit locking if client doesn't do 64 bit
(This used to be commit 759ca19f3223c28e3e3478b4001251d2cb0fbfd6)
-rw-r--r--source3/libsmb/clifile.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index b1be4aafc5..c325d882c9 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -489,6 +489,10 @@ BOOL cli_lock64(struct cli_state *cli, int fnum,
int saved_timeout = cli->timeout;
int ltype;
+ if (! (cli->capabilities & CAP_LARGE_FILES)) {
+ return cli_lock(cli, fnum, offset, len, timeout, lock_type);
+ }
+
ltype = (lock_type == READ_LOCK? 1 : 0);
ltype |= LOCKING_ANDX_LARGE_FILES;
@@ -540,6 +544,10 @@ BOOL cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_
{
char *p;
+ if (! (cli->capabilities & CAP_LARGE_FILES)) {
+ return cli_unlock(cli, fnum, offset, len);
+ }
+
memset(cli->outbuf,'\0',smb_size);
memset(cli->inbuf,'\0',smb_size);