Commit in reactos/ntoskrnl/io on MAIN
irp.c+14-11.70 -> 1.71
Set I/O completion port on completion of the IRP

reactos/ntoskrnl/io
irp.c 1.70 -> 1.71
diff -u -r1.70 -r1.71
--- irp.c	10 Nov 2004 02:50:59 -0000	1.70
+++ irp.c	26 Dec 2004 15:55:14 -0000	1.71
@@ -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 @@
    //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;
CVSspam 0.2.8