From bb8e4bcd9ebc145b0edbc91ae2d5c69262480582 Mon Sep 17 00:00:00 2001 From: Hartmut Birr Date: Fri, 25 Mar 2005 11:25:44 +0000 Subject: [PATCH] Fixed the return value and last error in ConnectNamedPipe if a overlapped structure is given. svn path=/trunk/; revision=14306 --- reactos/lib/kernel32/file/npipe.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/reactos/lib/kernel32/file/npipe.c b/reactos/lib/kernel32/file/npipe.c index 687888b1baa..3d41ff7efca 100644 --- a/reactos/lib/kernel32/file/npipe.c +++ b/reactos/lib/kernel32/file/npipe.c @@ -330,20 +330,15 @@ ConnectNamedPipe(HANDLE hNamedPipe, 0, NULL, 0); - if ((lpOverlapped != NULL) && (Status == STATUS_PENDING)) - return TRUE; - if ((lpOverlapped == NULL) && (Status == STATUS_PENDING)) { Status = NtWaitForSingleObject(hNamedPipe, FALSE, NULL); - if (!NT_SUCCESS(Status)) + if (NT_SUCCESS(Status)) { - SetLastErrorByStatus(Status); - return FALSE; + Status = Iosb.Status; } - Status = Iosb.Status; } if ((!NT_SUCCESS(Status) && Status != STATUS_PIPE_CONNECTED) ||