CreatePipe(): Don't open client side in passive mode.

svn path=/trunk/; revision=12702
This commit is contained in:
Eric Kohl 2005-01-01 14:06:39 +00:00
parent 4cffccfe6f
commit 9e8add4928

View file

@ -1,4 +1,4 @@
/* $Id: pipe.c,v 1.12 2004/10/08 23:12:29 weiden Exp $
/* $Id$
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@ -37,7 +37,8 @@ BOOL STDCALL CreatePipe(PHANDLE hReadPipe,
NTSTATUS Status;
HANDLE ReadPipeHandle;
HANDLE WritePipeHandle;
ULONG PipeId, Attributes;
ULONG PipeId;
ULONG Attributes;
PSECURITY_DESCRIPTOR SecurityDescriptor = NULL;
DefaultTimeout.QuadPart = 300000000; /* 30 seconds */
@ -54,8 +55,8 @@ BOOL STDCALL CreatePipe(PHANDLE hReadPipe,
if (lpPipeAttributes)
{
SecurityDescriptor = lpPipeAttributes->lpSecurityDescriptor;
if(lpPipeAttributes->bInheritHandle)
Attributes |= OBJ_INHERIT;
if (lpPipeAttributes->bInheritHandle)
Attributes |= OBJ_INHERIT;
}
InitializeObjectAttributes(&ObjectAttributes,
@ -88,7 +89,7 @@ BOOL STDCALL CreatePipe(PHANDLE hReadPipe,
FILE_GENERIC_WRITE,
&ObjectAttributes,
&StatusBlock,
FILE_SHARE_READ | FILE_SHARE_WRITE,
0,
FILE_SYNCHRONOUS_IO_NONALERT | FILE_NON_DIRECTORY_FILE);
if (!NT_SUCCESS(Status))
{