1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-29 21:47:30 +03:00

use 32 bit locking if client doesn't do 64 bit

This commit is contained in:
Andrew Tridgell -
parent 04478786c3
commit 759ca19f32

View 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);