Revert "DEBUG cancel"
authorStefan Metzmacher <metze@samba.org>
Tue, 6 Dec 2011 08:35:33 +0000 (09:35 +0100)
committerStefan Metzmacher <metze@samba.org>
Tue, 16 Jan 2018 06:45:27 +0000 (07:45 +0100)
This reverts commit c213ffe0151a86a664bc140b5e59590c0b32e764.

source3/torture/torture.c

index 2e675ae01078b533aea8b1825af5039b8f736b4e..ae502f280feeafd13702167ec87aaaacd1fc6bf1 100644 (file)
@@ -3886,7 +3886,7 @@ static bool run_oplock4(int dummy)
        state->cli = cli1;
        state->got_break = &got_break;
        state->fnum2 = &fnum2;
-/*
+
        oplock_req = cli_smb_oplock_break_waiter_send(
                talloc_tos(), ev, cli1);
        if (oplock_req == NULL) {
@@ -3894,7 +3894,7 @@ static bool run_oplock4(int dummy)
                return false;
        }
        tevent_req_set_callback(oplock_req, oplock4_got_break, state);
-*/
+
        open_req = cli_openx_send(
                talloc_tos(), ev, cli2, fname_ln, O_RDWR, DENY_NONE);
        if (open_req == NULL) {
@@ -3902,12 +3902,11 @@ static bool run_oplock4(int dummy)
                return false;
        }
        tevent_req_set_callback(open_req, oplock4_got_open, state);
-       tevent_req_cancel(open_req);
 
        got_break = false;
        fnum2 = 0xffff;
 
-       while (tevent_req_is_in_progress(open_req)) {// !got_break || fnum2 == 0xffff) {
+       while (!got_break || fnum2 == 0xffff) {
                int ret;
                ret = tevent_loop_once(ev);
                if (ret == -1) {
@@ -3929,18 +3928,6 @@ static bool run_oplock4(int dummy)
                correct = false;
        }
 
-       status = cli_open(cli2, fname, O_RDWR, DENY_NONE, &fnum2);
-       if (!NT_STATUS_IS_OK(status)) {
-               printf("open of %s failed (%s)\n", fname, nt_errstr(status));
-               return false;
-       }
-
-       status = cli_close(cli2, fnum2);
-       if (!NT_STATUS_IS_OK(status)) {
-               printf("close2 failed (%s)\n", nt_errstr(status));
-               correct = false;
-       }
-
        status = cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN);
        if (!NT_STATUS_IS_OK(status)) {
                printf("unlink failed (%s)\n", nt_errstr(status));