mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Added patch to set NamedPipeState to FILE_PIPE_CLOSING_STATE on broken pipe in NtQueryInformationFile.
This commit is contained in:
parent
fd6ff0999c
commit
9acb14c728
@ -39,12 +39,13 @@ Wine. All those differences are also documented on the
|
||||
Included bug fixes and improvements
|
||||
-----------------------------------
|
||||
|
||||
**Bug fixes and features included in the next upcoming release [6]:**
|
||||
**Bug fixes and features included in the next upcoming release [7]:**
|
||||
|
||||
* Add implementation for kernel32.GetNumaProcessorNode ([Wine Bug #38660](https://bugs.winehq.org/show_bug.cgi?id=38660))
|
||||
* Implement mscoree._CorValidateImage for mono runtime ([Wine Bug #38662](https://bugs.winehq.org/show_bug.cgi?id=38662))
|
||||
* Implement proper handling of CLI .NET images in Wine library loader ([Wine Bug #38661](https://bugs.winehq.org/show_bug.cgi?id=38661))
|
||||
* Multiple applications needs better NtQueryInformationJobObject stub ([Wine Bug #38658](https://bugs.winehq.org/show_bug.cgi?id=38658))
|
||||
* Set NamedPipeState to FILE_PIPE_CLOSING_STATE on broken pipe in NtQueryInformationFile
|
||||
* Support for NtSetInformationFile class FileLinkInformation
|
||||
* Support for NtSetInformationFile class FileRenameInformation ([Wine Bug #30399](https://bugs.winehq.org/show_bug.cgi?id=30399))
|
||||
|
||||
|
2
debian/changelog
vendored
2
debian/changelog
vendored
@ -19,6 +19,8 @@ wine-staging (1.7.45) UNRELEASED; urgency=low
|
||||
#297).
|
||||
* Added patch to restore original error code in rpcrt4 when ReadFile fails
|
||||
with ERROR_MORE_DATA.
|
||||
* Added patch to set NamedPipeState to FILE_PIPE_CLOSING_STATE on broken pipe
|
||||
in NtQueryInformationFile.
|
||||
* Removed patch to fix NULL pointer dereference in get_frame_by_name
|
||||
(identical patch accepted upstream).
|
||||
-- Sebastian Lackner <sebastian@fds-team.de> Sun, 31 May 2015 14:46:37 +0200
|
||||
|
@ -0,0 +1,48 @@
|
||||
From 2c7eba8922e51d745c46b19971e0e8764a4052b5 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Thu, 4 Jun 2015 00:02:13 +0200
|
||||
Subject: ntdll: Set NamedPipeState to FILE_PIPE_CLOSING_STATE on broken pipe
|
||||
in NtQueryInformationFile.
|
||||
|
||||
---
|
||||
dlls/ntdll/file.c | 6 +++++-
|
||||
include/winternl.h | 5 +++++
|
||||
2 files changed, 10 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
|
||||
index 3b0a06c..62033e1 100644
|
||||
--- a/dlls/ntdll/file.c
|
||||
+++ b/dlls/ntdll/file.c
|
||||
@@ -2893,8 +2893,12 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE hFile, PIO_STATUS_BLOCK io,
|
||||
|
||||
if (!server_get_unix_fd( hFile, FILE_READ_DATA, &fd, &needs_close, NULL, NULL ))
|
||||
{
|
||||
- if (!unix_fd_avail( fd, &avail ))
|
||||
+ NTSTATUS status = unix_fd_avail( fd, &avail );
|
||||
+ if (!status)
|
||||
pli->ReadDataAvailable = min(avail, reply->outsize); /* FIXME */
|
||||
+ else if (status == STATUS_PIPE_BROKEN)
|
||||
+ pli->NamedPipeState = FILE_PIPE_CLOSING_STATE;
|
||||
+
|
||||
if (needs_close) close( fd );
|
||||
}
|
||||
}
|
||||
diff --git a/include/winternl.h b/include/winternl.h
|
||||
index 28b9e29..88bcdab 100644
|
||||
--- a/include/winternl.h
|
||||
+++ b/include/winternl.h
|
||||
@@ -668,6 +668,11 @@ typedef struct _FILE_PIPE_LOCAL_INFORMATION {
|
||||
ULONG NamedPipeEnd;
|
||||
} FILE_PIPE_LOCAL_INFORMATION, *PFILE_PIPE_LOCAL_INFORMATION;
|
||||
|
||||
+#define FILE_PIPE_DISCONNECTED_STATE 0x01
|
||||
+#define FILE_PIPE_LISTENING_STATE 0x02
|
||||
+#define FILE_PIPE_CONNECTED_STATE 0x03
|
||||
+#define FILE_PIPE_CLOSING_STATE 0x04
|
||||
+
|
||||
typedef struct _FILE_ALL_INFORMATION {
|
||||
FILE_BASIC_INFORMATION BasicInformation;
|
||||
FILE_STANDARD_INFORMATION StandardInformation;
|
||||
--
|
||||
2.4.2
|
||||
|
@ -1,5 +1,6 @@
|
||||
Fixes: [16550] Fix for ConnectNamedPort return value in overlapped mode
|
||||
Fixes: [17195] Support for named pipe message mode (Linux only)
|
||||
Fixes: Improve ReadDataAvailable handling in FilePipeLocalInformation class
|
||||
Fixes: Set NamedPipeState to FILE_PIPE_CLOSING_STATE on broken pipe in NtQueryInformationFile
|
||||
Depends: rpcrt4-Pipe_Transport
|
||||
Category: stable
|
||||
|
@ -3171,8 +3171,8 @@ fi
|
||||
# | * [#17195] Support for named pipe message mode (Linux only)
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/kernel32/file.c, dlls/kernel32/sync.c, dlls/kernel32/tests/pipe.c, dlls/ntdll/file.c, server/named_pipe.c,
|
||||
# | server/protocol.def, server/sock.c, server/sock.h
|
||||
# | * dlls/kernel32/file.c, dlls/kernel32/sync.c, dlls/kernel32/tests/pipe.c, dlls/ntdll/file.c, include/winternl.h,
|
||||
# | server/named_pipe.c, server/protocol.def, server/sock.c, server/sock.h
|
||||
# |
|
||||
if test "$enable_kernel32_Named_Pipe" -eq 1; then
|
||||
patch_apply kernel32-Named_Pipe/0001-kernel32-ConnectNamedPort-should-return-FALSE-and-se.patch
|
||||
@ -3193,6 +3193,7 @@ if test "$enable_kernel32_Named_Pipe" -eq 1; then
|
||||
patch_apply kernel32-Named_Pipe/0016-ntdll-Allow-to-set-PIPE_NOWAIT-on-byte-mode-pipes.patch
|
||||
patch_apply kernel32-Named_Pipe/0017-kernel32-tests-Add-additional-tests-for-PIPE_NOWAIT-.patch
|
||||
patch_apply kernel32-Named_Pipe/0018-ntdll-Improve-ReadDataAvailable-handling-in-FilePipe.patch
|
||||
patch_apply kernel32-Named_Pipe/0019-ntdll-Set-NamedPipeState-to-FILE_PIPE_CLOSING_STATE-.patch
|
||||
(
|
||||
echo '+ { "Dan Kegel", "kernel32: ConnectNamedPort should return FALSE and set ERROR_PIPE_CONNECTED on success in overlapped mode.", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "kernel32/tests: Add tests for PeekNamedPipe with partial received messages.", 1 },';
|
||||
@ -3212,6 +3213,7 @@ if test "$enable_kernel32_Named_Pipe" -eq 1; then
|
||||
echo '+ { "Sebastian Lackner", "ntdll: Allow to set PIPE_NOWAIT on byte-mode pipes.", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "kernel32/tests: Add additional tests for PIPE_NOWAIT in overlapped mode.", 1 },';
|
||||
echo '+ { "Qian Hong", "ntdll: Improve ReadDataAvailable handling in FilePipeLocalInformation class support.", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "ntdll: Set NamedPipeState to FILE_PIPE_CLOSING_STATE on broken pipe in NtQueryInformationFile.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user