From 68eb737ebb05ea27d51588c2f5c8fa5d6dce7cff Mon Sep 17 00:00:00 2001
From: Dan Kegel <dank@kegel.com>
Date: Sat, 26 Jul 2014 14:07:55 -0600
Subject: kernel32: ConnectNamedPort should return FALSE and set
 ERROR_PIPE_CONNECTED on success in overlapped mode.

---
 dlls/kernel32/sync.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/dlls/kernel32/sync.c b/dlls/kernel32/sync.c
index 8210624..ff0e234 100644
--- a/dlls/kernel32/sync.c
+++ b/dlls/kernel32/sync.c
@@ -1609,6 +1609,7 @@ BOOL WINAPI ConnectNamedPipe(HANDLE hPipe, LPOVERLAPPED overlapped)
                              overlapped ? (IO_STATUS_BLOCK *)overlapped : &status_block,
                              FSCTL_PIPE_LISTEN, NULL, 0, NULL, 0);
 
+    if (overlapped && status == STATUS_SUCCESS) status = STATUS_PIPE_CONNECTED;
     if (status == STATUS_SUCCESS) return TRUE;
     SetLastError( RtlNtStatusToDosError(status) );
     return FALSE;
-- 
1.7.9.5

