Added patch to fix ConnectNamedPort return value in overlapped mode.

This commit is contained in:
Erich E. Hoover
2014-07-26 14:12:52 -06:00
parent ddf264985b
commit d703791841
4 changed files with 34 additions and 5 deletions

View File

@@ -0,0 +1,25 @@
From 873c6600c711af413a0f2b8e71ebf74e3638f474 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 a274fd3..cf84269 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

View File

@@ -1,5 +1,6 @@
Author: Sebastian Lackner
Subject: Change return value of stub SetNamedPipeHandleState to TRUE.
Revision: 1
Author: Sebastian Lackner / Dan Kegel
Subject: Support for NamedPipe operations.
Revision: 2
Fixes: [16550] Fix for ConnectNamedPort return value in overlapped mode
Fixes: [17273] Workaround for TransactNamedPipe not being supported