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) {
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) {
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) {
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));