Author: cgutman
Date: Thu May 27 02:26:34 2010
New Revision: 47370
URL:
http://svn.reactos.org/svn/reactos?rev=47370&view=rev
Log:
[NPFS]
- Change the other side's to PIPE_STATUS_CLOSING_STATE in NpfsCleanup and NpfsClose so
the reading/writing thread knows that the pipe is dead when we signal its event
- Fixes iphlpapi_winetest hang and possibly bug #4689
Modified:
trunk/reactos/drivers/filesystems/npfs/create.c
trunk/reactos/drivers/filesystems/npfs/rw.c
Modified: trunk/reactos/drivers/filesystems/npfs/create.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs/c…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs/create.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs/create.c [iso-8859-1] Thu May 27 02:26:34 2010
@@ -619,7 +619,7 @@
ExAcquireFastMutex(&OtherSide->DataListLock);
ExAcquireFastMutex(&Ccb->DataListLock);
}
- //OtherSide->PipeState = FILE_PIPE_DISCONNECTED_STATE;
+ OtherSide->PipeState = FILE_PIPE_CLOSING_STATE;
OtherSide->OtherSide = NULL;
/*
* Signaling the write event. If is possible that an other
@@ -743,8 +743,12 @@
}
/* Disconnect the pipes */
- if (Ccb->OtherSide) Ccb->OtherSide->OtherSide = NULL;
- if (Ccb) Ccb->OtherSide = NULL;
+ if (Ccb->OtherSide)
+ {
+ Ccb->OtherSide->PipeState = FILE_PIPE_CLOSING_STATE;
+ Ccb->OtherSide->OtherSide = NULL;
+ Ccb->OtherSide = NULL;
+ }
ASSERT(Ccb->PipeState == FILE_PIPE_CLOSING_STATE);
Modified: trunk/reactos/drivers/filesystems/npfs/rw.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs/r…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs/rw.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs/rw.c [iso-8859-1] Thu May 27 02:26:34 2010
@@ -331,7 +331,7 @@
if ((Ccb->OtherSide == NULL) && (Ccb->ReadDataAvailable == 0))
{
- if (Ccb->PipeState == FILE_PIPE_CONNECTED_STATE)
+ if (Ccb->PipeState == FILE_PIPE_CLOSING_STATE)
{
DPRINT("File pipe broken\n");
Status = STATUS_PIPE_BROKEN;