void nb_setup(struct cli_state *cli)
{
signal(SIGSEGV, sigsegv);
- /* to be like a true Windows client we need to negotiate oplocks */
- cli->use_oplocks = True;
c = cli;
}
static int procnum; /* records process count number when forking */
static struct cli_state current_cli;
static fstring randomfname;
+static BOOL use_oplocks;
static double create_procs(void (*fn)(int));
}
c->timeout = 120000; /* set a really long timeout (2 minutes) */
+ if (use_oplocks) c->use_oplocks = True;
if (!cli_session_request(c, &calling, &called)) {
printf("%s rejected the session\n",host);
fstring fname;
int fnum;
int retries=4;
- int n = numops;
cli = current_cli;
printf("\t-o num_operations\n");
printf("\t-O socket_options\n");
printf("\t-m maximum protocol\n");
+ printf("\t-L use oplocks\n");
printf("\n\n");
printf("tests are:");
fstrcpy(workgroup, lp_workgroup());
- while ((opt = getopt(argc, argv, "hW:U:n:N:O:o:m:")) != EOF) {
+ while ((opt = getopt(argc, argv, "hW:U:n:N:O:o:m:L")) != EOF) {
switch (opt) {
case 'W':
fstrcpy(workgroup,optarg);
case 'O':
sockops = optarg;
break;
+ case 'L':
+ use_oplocks = True;
+ break;
case 'n':
fstrcpy(myname, optarg);
break;