mirror of
https://github.com/samba-team/samba.git
synced 2025-03-01 04:58:35 +03:00
fixed use_oplocks and the timeout in smbtorture startup
(This used to be commit cec1ef09e5009cdac22e6c9ca101a49c5ef36b1a)
This commit is contained in:
parent
44bd743c28
commit
8dd9e99f37
@ -150,15 +150,25 @@ BOOL torture_open_connection(struct cli_state **c)
|
|||||||
{
|
{
|
||||||
BOOL retry;
|
BOOL retry;
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
|
NTSTATUS status;
|
||||||
|
|
||||||
if (use_kerberos)
|
if (use_kerberos)
|
||||||
flags |= CLI_FULL_CONNECTION_USE_KERBEROS;
|
flags |= CLI_FULL_CONNECTION_USE_KERBEROS;
|
||||||
|
|
||||||
return (NT_STATUS_IS_OK(
|
status = cli_full_connection(c, myname,
|
||||||
cli_full_connection(c, myname,
|
host, NULL, port_to_use,
|
||||||
host, NULL, port_to_use,
|
share, "?????",
|
||||||
share, "?????",
|
username, workgroup,
|
||||||
username, workgroup,
|
password, flags, &retry);
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user