-/* $Id: create.c,v 1.28 2004/12/30 16:15:10 ekohl Exp $
+/* $Id$
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
return STATUS_NO_MEMORY;
}
+ ClientFcb->Thread = (struct ETHREAD *)Irp->Tail.Overlay.Thread;
ClientFcb->Pipe = Pipe;
ClientFcb->PipeEnd = FILE_PIPE_CLIENT_END;
ClientFcb->OtherSide = NULL;
/* Add the client FCB to the pipe FCB list. */
InsertTailList(&Pipe->ClientFcbListHead, &ClientFcb->FcbListEntry);
- if (ServerFcb)
+ /* Connect pipes if they were created by the same thread */
+ if (ServerFcb && ServerFcb->Thread == ClientFcb->Thread)
{
ClientFcb->OtherSide = ServerFcb;
ServerFcb->OtherSide = ClientFcb;
return STATUS_NO_MEMORY;
}
+ Fcb->Thread = (struct ETHREAD *)Irp->Tail.Overlay.Thread;
KeLockMutex(&DeviceExt->PipeListLock);
/*
-/* $Id: fsctrl.c,v 1.18 2004/12/30 12:34:27 ekohl Exp $
+/* $Id$
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
break;
}
-
#if 0
if (ClientFcb->PipeState == FILE_PIPE_LISTENING_STATE)
{
-/* $Id: npfs.h,v 1.17 2004/05/10 19:58:10 navaraf Exp $ */
+/* $Id$ */
#ifndef __SERVICES_FS_NP_NPFS_H
#define __SERVICES_FS_NP_NPFS_H
*/
#define FIN_WORKAROUND_READCLOSE
-typedef struct
+typedef struct _NPFS_DEVICE_EXTENSION
{
LIST_ENTRY PipeListHead;
KMUTEX PipeListLock;
ULONG MaxQuota;
} NPFS_DEVICE_EXTENSION, *PNPFS_DEVICE_EXTENSION;
-typedef struct
+typedef struct _NPFS_PIPE
{
UNICODE_STRING PipeName;
LIST_ENTRY PipeListEntry;
{
LIST_ENTRY FcbListEntry;
struct _NPFS_FCB* OtherSide;
+ struct ETHREAD *Thread;
PNPFS_PIPE Pipe;
KEVENT ConnectEvent;
KEVENT Event;