Commit 2f08e95b authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

ntoskrnl: Clear the pending flags for the current stack location before calling…

ntoskrnl: Clear the pending flags for the current stack location before calling the previous location's completion routine. Signed-off-by: 's avatarZebediah Figura <zfigura@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 14d1855a
......@@ -1990,6 +1990,7 @@ VOID WINAPI IoCompleteRequest( IRP *irp, UCHAR priority_boost )
else
device = NULL;
irp->PendingReturned = !!(irpsp->Control & SL_PENDING_RETURNED);
irpsp->Control = 0;
if (call_flag)
{
TRACE( "calling %p( %p, %p, %p )\n", routine, device, irp, irpsp->Context );
......
......@@ -1753,7 +1753,7 @@ static NTSTATUS WINAPI completion_cb(DEVICE_OBJECT *device, IRP *irp, void *cont
ok(stack->Control == (SL_INVOKE_ON_CANCEL | SL_INVOKE_ON_ERROR | SL_INVOKE_ON_SUCCESS),
"Got control flags %#x.\n", stack->Control);
stack = IoGetNextIrpStackLocation(irp);
todo_wine ok(!stack->Control, "Got control flags %#x.\n", stack->Control);
ok(!stack->Control, "Got control flags %#x.\n", stack->Control);
stack = irp->Tail.Overlay.CurrentStackLocation + 1; /* previous location */
ok(!stack->Control, "Got control flags %#x.\n", stack->Control);
......@@ -1768,9 +1768,9 @@ static NTSTATUS WINAPI completion_cb(DEVICE_OBJECT *device, IRP *irp, void *cont
ok(irp->CurrentLocation == 3, "Got current location %u.\n", irp->CurrentLocation);
ok(!stack->Control, "Got control flags %#x.\n", stack->Control);
stack = IoGetNextIrpStackLocation(irp);
todo_wine ok(!stack->Control, "Got control flags %#x.\n", stack->Control);
ok(!stack->Control, "Got control flags %#x.\n", stack->Control);
stack = irp->Tail.Overlay.CurrentStackLocation - 2; /* lowest location */
todo_wine ok(!stack->Control, "Got control flags %#x.\n", stack->Control);
ok(!stack->Control, "Got control flags %#x.\n", stack->Control);
}
++got_completion;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment