Commit 72876116 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

ntoskrnl.exe: Set irp context handle in dispatch_irp.

parent 0138da50
...@@ -587,6 +587,8 @@ static void dispatch_irp( DEVICE_OBJECT *device, IRP *irp, struct dispatch_conte ...@@ -587,6 +587,8 @@ static void dispatch_irp( DEVICE_OBJECT *device, IRP *irp, struct dispatch_conte
LARGE_INTEGER count; LARGE_INTEGER count;
IoSetCompletionRoutine( irp, dispatch_irp_completion, context->handle, TRUE, TRUE, TRUE ); IoSetCompletionRoutine( irp, dispatch_irp_completion, context->handle, TRUE, TRUE, TRUE );
context->handle = 0;
KeQueryTickCount( &count ); /* update the global KeTickCount */ KeQueryTickCount( &count ); /* update the global KeTickCount */
device->CurrentIrp = irp; device->CurrentIrp = irp;
...@@ -976,11 +978,7 @@ NTSTATUS CDECL wine_ntoskrnl_main_loop( HANDLE stop_event ) ...@@ -976,11 +978,7 @@ NTSTATUS CDECL wine_ntoskrnl_main_loop( HANDLE stop_event )
case STATUS_SUCCESS: case STATUS_SUCCESS:
assert( context.params.type != IRP_CALL_NONE && context.params.type < ARRAY_SIZE(dispatch_funcs) ); assert( context.params.type != IRP_CALL_NONE && context.params.type < ARRAY_SIZE(dispatch_funcs) );
status = dispatch_funcs[context.params.type]( &context ); status = dispatch_funcs[context.params.type]( &context );
if (status == STATUS_SUCCESS) if (!context.in_buff) context.in_size = 4096;
{
context.handle = 0; /* status reported by IoCompleteRequest */
if (!context.in_buff) context.in_size = 4096;
}
break; break;
case STATUS_BUFFER_OVERFLOW: case STATUS_BUFFER_OVERFLOW:
HeapFree( GetProcessHeap(), 0, context.in_buff ); HeapFree( GetProcessHeap(), 0, context.in_buff );
......
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