]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:torture:smb2: move some initialization and call to smb2_create together in durable...
authorMichael Adam <obnox@samba.org>
Tue, 21 Feb 2012 17:00:30 +0000 (18:00 +0100)
committerMichael Adam <obnox@samba.org>
Tue, 21 Feb 2012 17:11:06 +0000 (18:11 +0100)
source4/torture/smb2/durable_open.c

index 29825e0f84f52f67ace2f2736c6b76543364cde1..2d554a395de94c023ea0737d0d92e2c251b36b0b 100644 (file)
@@ -1009,8 +1009,6 @@ bool test_durable_open_open(struct torture_context *tctx,
                                smb2_util_lease_state("RH"));
        io1.in.durable_open = true;
 
-       smb2_oplock_create(&io2, fname, SMB2_OPLOCK_LEVEL_NONE);
-
        status = smb2_create(tree1, mem_ctx, &io1);
        CHECK_STATUS(status, NT_STATUS_OK);
        h1 = io1.out.file.handle;
@@ -1028,6 +1026,8 @@ bool test_durable_open_open(struct torture_context *tctx,
        tree1 = NULL;
 
        /* Open the file in tree2 */
+       smb2_oplock_create(&io2, fname, SMB2_OPLOCK_LEVEL_NONE);
+
        status = smb2_create(tree2, mem_ctx, &io2);
        CHECK_STATUS(status, NT_STATUS_OK);
        h2 = io2.out.file.handle;