summaryrefslogtreecommitdiffstats
path: root/source3/libsmb/clientgen.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-01-14 04:32:57 +0000
committerAndrew Tridgell <tridge@samba.org>2000-01-14 04:32:57 +0000
commit82af221e4a7e456f580f16bc5d2fd904fc018c96 (patch)
tree1b0818867ea76a25e578345364186566c4f167c4 /source3/libsmb/clientgen.c
parent7cd74b07ef283a4ce2e6f6c98cc7096189a74f20 (diff)
downloadsamba-82af221e4a7e456f580f16bc5d2fd904fc018c96.tar.gz
samba-82af221e4a7e456f580f16bc5d2fd904fc018c96.tar.xz
samba-82af221e4a7e456f580f16bc5d2fd904fc018c96.zip
we now pass all byte range locking tests
the last piece was to use a smb timeout slightly larger than the locking timeout in bloking locks to prevent a race (This used to be commit 1b54cb4a33a65e62c2e3189b78ef073869a60c75)
Diffstat (limited to 'source3/libsmb/clientgen.c')
-rw-r--r--source3/libsmb/clientgen.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index 06a5e5427fb..1c9a2123cce 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -1372,7 +1372,7 @@ BOOL cli_lock(struct cli_state *cli, int fnum,
SIVAL(p, 6, len);
cli_send_smb(cli);
- cli->timeout = (timeout == -1) ? 0x7FFFFFFF : timeout;
+ cli->timeout = (timeout == -1) ? 0x7FFFFFFF : (timeout + 2*1000);
if (!cli_receive_smb(cli)) {
cli->timeout = saved_timeout;
@@ -1391,8 +1391,7 @@ BOOL cli_lock(struct cli_state *cli, int fnum,
/****************************************************************************
unlock a file
****************************************************************************/
-BOOL cli_unlock(struct cli_state *cli, int fnum,
- uint32 offset, uint32 len, int timeout)
+BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len)
{
char *p;
@@ -1408,7 +1407,7 @@ BOOL cli_unlock(struct cli_state *cli, int fnum,
CVAL(cli->outbuf,smb_vwv0) = 0xFF;
SSVAL(cli->outbuf,smb_vwv2,fnum);
CVAL(cli->outbuf,smb_vwv3) = 0;
- SIVALS(cli->outbuf, smb_vwv4, timeout);
+ SIVALS(cli->outbuf, smb_vwv4, 0);
SSVAL(cli->outbuf,smb_vwv6,1);
SSVAL(cli->outbuf,smb_vwv7,0);