Set I/O completion port on completion of the IRP

svn path=/trunk/; revision=12344
This commit is contained in:
Gé van Geldorp 2004-12-26 15:55:14 +00:00
parent f5639215be
commit cbfd8c1020

View file

@ -1,4 +1,4 @@
/* $Id: irp.c,v 1.70 2004/11/10 02:50:59 ion Exp $
/* $Id: irp.c,v 1.71 2004/12/26 15:55:14 gvg Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -447,6 +447,19 @@ IofCompleteRequest(PIRP Irp,
//Windows NT File System Internals, page 154
OriginalFileObject = Irp->Tail.Overlay.OriginalFileObject;
if (NULL != Stack->FileObject
&& NULL != Stack->FileObject->CompletionContext
&& Irp->PendingReturned)
{
PFILE_OBJECT FileObject = Stack->FileObject;
IoSetIoCompletion(FileObject->CompletionContext->Port,
FileObject->CompletionContext->Key,
Irp->Overlay.AsynchronousParameters.UserApcContext,
Irp->IoStatus.Status,
Irp->IoStatus.Information,
FALSE);
}
if (Irp->PendingReturned || KeGetCurrentIrql() == DISPATCH_LEVEL)
{
BOOLEAN bStatus;