summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-03-10 02:51:30 +0000
committerAndrew Tridgell <tridge@samba.org>2003-03-10 02:51:30 +0000
commit8dd9e99f37c984f94e9ebc2005e3806c9bb43767 (patch)
tree614bbb307676ecddd233316be2481c51b6462efe
parent44bd743c286405cad0b10149ff5e116fc21e8322 (diff)
downloadsamba-8dd9e99f37c984f94e9ebc2005e3806c9bb43767.tar.gz
samba-8dd9e99f37c984f94e9ebc2005e3806c9bb43767.tar.bz2
samba-8dd9e99f37c984f94e9ebc2005e3806c9bb43767.zip
fixed use_oplocks and the timeout in smbtorture startup
(This used to be commit cec1ef09e5009cdac22e6c9ca101a49c5ef36b1a)
-rw-r--r--source3/torture/torture.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index ca4dbed1d8..090f08c160 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -150,15 +150,25 @@ BOOL torture_open_connection(struct cli_state **c)
{
BOOL retry;
int flags = 0;
+ NTSTATUS status;
+
if (use_kerberos)
flags |= CLI_FULL_CONNECTION_USE_KERBEROS;
- return (NT_STATUS_IS_OK(
- cli_full_connection(c, myname,
- host, NULL, port_to_use,
- share, "?????",
- username, workgroup,
- password, flags, &retry)));
+ status = cli_full_connection(c, myname,
+ host, NULL, port_to_use,
+ share, "?????",
+ username, workgroup,
+ password, flags, &retry);
+ if (!NT_STATUS_IS_OK(status)) {
+ return False;
+ }
+
+ if (use_oplocks) (*c)->use_oplocks = True;
+ if (use_level_II_oplocks) (*c)->use_level_II_oplocks = True;
+ (*c)->timeout = 120000; /* set a really long timeout (2 minutes) */
+
+ return True;
}