summaryrefslogtreecommitdiff
path: root/source3/libsmb/clifile.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb/clifile.c')
-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;