[ros-diffs] [hbirr] 13767: Do only signal the other side of the pipe if the pipe is connected.

hbirr at svn.reactos.com hbirr at svn.reactos.com
Sun Feb 27 21:38:37 CET 2005


Do only signal the other side of the pipe if the pipe is connected.
Modified: trunk/reactos/drivers/fs/np/rw.c
  _____  

Modified: trunk/reactos/drivers/fs/np/rw.c
--- trunk/reactos/drivers/fs/np/rw.c	2005-02-27 17:03:00 UTC (rev
13766)
+++ trunk/reactos/drivers/fs/np/rw.c	2005-02-27 20:38:36 UTC (rev
13767)
@@ -102,7 +102,10 @@

       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 @@
 
 	  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;
 	    }
 	}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20050227/edda087d/attachment.html


More information about the Ros-diffs mailing list