From 2e93c2f4d90560c7862e300e201463b37e0f16cd Mon Sep 17 00:00:00 2001 From: Hartmut Birr Date: Sun, 27 Feb 2005 20:38:36 +0000 Subject: [PATCH 1/1] Do only signal the other side of the pipe if the pipe is connected. svn path=/trunk/; revision=13767 --- reactos/drivers/fs/np/rw.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/reactos/drivers/fs/np/rw.c b/reactos/drivers/fs/np/rw.c index f7ff3a5b0b1..c52403b8e69 100644 --- a/reactos/drivers/fs/np/rw.c +++ b/reactos/drivers/fs/np/rw.c @@ -102,7 +102,10 @@ NpfsRead(PDEVICE_OBJECT DeviceObject, if (Fcb->ReadDataAvailable == 0) { KeResetEvent(&Fcb->Event); - KeSetEvent(&WriterFcb->Event, IO_NO_INCREMENT, FALSE); + if (Fcb->PipeState == FILE_PIPE_CONNECTED_STATE) + { + KeSetEvent(&WriterFcb->Event, IO_NO_INCREMENT, FALSE); + } KeReleaseSpinLock(&Fcb->DataListLock, OldIrql); if (Information > 0) { @@ -190,7 +193,10 @@ NpfsRead(PDEVICE_OBJECT DeviceObject, if (Information > 0) { - KeSetEvent(&WriterFcb->Event, IO_NO_INCREMENT, FALSE); + if (Fcb->PipeState == FILE_PIPE_CONNECTED_STATE) + { + KeSetEvent(&WriterFcb->Event, IO_NO_INCREMENT, FALSE); + } break; } } -- 2.17.1