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…
==============================================================================
--- 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))