An attempt to read from a not-yet-connected pipe must fail. This fixes a Wine testcase.

svn path=/trunk/; revision=21757
This commit is contained in:
Eric Kohl 2006-04-30 07:47:07 +00:00
parent 7410babf41
commit c2f31954b8

View file

@ -318,6 +318,14 @@ NpfsRead(IN PDEVICE_OBJECT DeviceObject,
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 @@ NpfsRead(IN PDEVICE_OBJECT DeviceObject,
}
Irp->IoStatus.Information = Information;
Irp->IoStatus.Status = Status;
ASSERT(IoGetCurrentIrpStackLocation(Irp)->FileObject != NULL);
if (IoIsOperationSynchronous(Irp))