ConnectNamedPipe must return TRUE if lpOverlapped is not NULL and NtFsIoControl returns STATUS_PENDING.

svn path=/trunk/; revision=13765
This commit is contained in:
Eric Kohl 2005-02-27 15:46:46 +00:00
parent 2229c3b1f4
commit ccabddbffd

View file

@ -330,6 +330,9 @@ ConnectNamedPipe(HANDLE hNamedPipe,
0,
NULL,
0);
if ((lpOverlapped != NULL) && (Status == STATUS_PENDING))
return TRUE;
if ((lpOverlapped == NULL) && (Status == STATUS_PENDING))
{
Status = NtWaitForSingleObject(hNamedPipe,
@ -338,17 +341,19 @@ ConnectNamedPipe(HANDLE hNamedPipe,
if (!NT_SUCCESS(Status))
{
SetLastErrorByStatus(Status);
return(FALSE);
return FALSE;
}
Status = Iosb.Status;
}
if ((!NT_SUCCESS(Status) && Status != STATUS_PIPE_CONNECTED) ||
(Status == STATUS_PENDING))
{
SetLastErrorByStatus(Status);
return(FALSE);
return FALSE;
}
return(TRUE);
return TRUE;
}