summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2002-03-10 23:16:15 +0000
committerAndrew Tridgell <tridge@samba.org>2002-03-10 23:16:15 +0000
commit69b395d2c1aff0d53d077d9fcb72adf8a3dbb4d5 (patch)
treee67258c63fe23582e431a2b4146e1fbd640dc830
parent59361453d993a91e9dfbc0087a8445bf993cb779 (diff)
downloadsamba-69b395d2c1aff0d53d077d9fcb72adf8a3dbb4d5.tar.gz
samba-69b395d2c1aff0d53d077d9fcb72adf8a3dbb4d5.tar.bz2
samba-69b395d2c1aff0d53d077d9fcb72adf8a3dbb4d5.zip
better handling of a zero timeout in cli_lock
(This used to be commit 56662a75f58d35cec1a5b2d6c9a4315d95a22420)
-rw-r--r--source3/libsmb/clifile.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index 71b3f44b0d..102114f871 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -579,7 +579,9 @@ BOOL cli_lock(struct cli_state *cli, int fnum,
cli_send_smb(cli);
- cli->timeout = (timeout == -1) ? 0x7FFFFFFF : (timeout + 2*1000);
+ if (timeout != 0) {
+ cli->timeout = (timeout == -1) ? 0x7FFFFFFF : (timeout + 2*1000);
+ }
if (!cli_receive_smb(cli)) {
cli->timeout = saved_timeout;
@@ -680,7 +682,9 @@ BOOL cli_lock64(struct cli_state *cli, int fnum,
cli_setup_bcc(cli, p);
cli_send_smb(cli);
- cli->timeout = (timeout == -1) ? 0x7FFFFFFF : (timeout + 2*1000);
+ if (timeout != 0) {
+ cli->timeout = (timeout == -1) ? 0x7FFFFFFF : (timeout + 5*1000);
+ }
if (!cli_receive_smb(cli)) {
cli->timeout = saved_timeout;