use 32 bit locking if client doesn't do 64 bit
authorAndrew Tridgell <tridge@samba.org>
Thu, 23 Aug 2001 23:15:18 +0000 (23:15 +0000)
committerAndrew Tridgell <tridge@samba.org>
Thu, 23 Aug 2001 23:15:18 +0000 (23:15 +0000)
(This used to be commit 759ca19f3223c28e3e3478b4001251d2cb0fbfd6)

source3/libsmb/clifile.c

index b1be4aafc55ee568c0e94a3c4e936d592650a5dd..c325d882c9e7b2cc8b5b14ba1e640ddc9d547a5d 100644 (file)
@@ -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);