From 8dd9e99f37c984f94e9ebc2005e3806c9bb43767 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 10 Mar 2003 02:51:30 +0000 Subject: fixed use_oplocks and the timeout in smbtorture startup (This used to be commit cec1ef09e5009cdac22e6c9ca101a49c5ef36b1a) --- source3/torture/torture.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'source3') 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; } -- cgit