[ros-diffs] [ekohl] 21757: An attempt to read from a not-yet-connected pipe must fail. This fixes a Wine testcase.

ekohl at svn.reactos.org ekohl at svn.reactos.org
Sun Apr 30 09:47:08 CEST 2006


Author: ekohl
Date: Sun Apr 30 11:47:07 2006
New Revision: 21757

URL: http://svn.reactos.ru/svn/reactos?rev=21757&view=rev
Log:
An attempt to read from a not-yet-connected pipe must fail. This fixes a Wine testcase.

Modified:
    trunk/reactos/drivers/filesystems/np/rw.c

Modified: trunk/reactos/drivers/filesystems/np/rw.c
URL: http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/filesystems/np/rw.c?rev=21757&r1=21756&r2=21757&view=diff
==============================================================================
--- trunk/reactos/drivers/filesystems/np/rw.c (original)
+++ trunk/reactos/drivers/filesystems/np/rw.c Sun Apr 30 11:47:07 2006
@@ -318,6 +318,14 @@
   Fcb = FileObject->FsContext;
   Context = (PNPFS_CONTEXT)&Irp->Tail.Overlay.DriverContext;
 
+  if (Fcb->OtherSide == NULL && Fcb->PipeState == FILE_PIPE_LISTENING_STATE)
+  {
+     DPRINT("Pipe is NOT yet connected!\n");
+     Status = STATUS_PIPE_LISTENING;
+     Irp->IoStatus.Information = 0;
+     goto done;
+  }
+
   if (Fcb->Data == NULL)
   {
      DPRINT1("Pipe is NOT readable!\n");
@@ -529,7 +537,7 @@
      }
      Irp->IoStatus.Information = Information;
      Irp->IoStatus.Status = Status;
-     
+
      ASSERT(IoGetCurrentIrpStackLocation(Irp)->FileObject != NULL);
 
      if (IoIsOperationSynchronous(Irp))




More information about the Ros-diffs mailing list