Sebastian Lackner : ntdll: Do not update iosb.Status after FSCTL_PIPE_LISTEN call.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Apr 7 11:42:52 CDT 2016


Module: wine
Branch: master
Commit: 9acff7550de83767438f83207827e1154a0e9c5e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=9acff7550de83767438f83207827e1154a0e9c5e

Author: Sebastian Lackner <sebastian at fds-team.de>
Date:   Thu Apr  7 10:02:42 2016 +0200

ntdll: Do not update iosb.Status after FSCTL_PIPE_LISTEN call.

Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/kernel32/tests/pipe.c | 2 +-
 dlls/ntdll/file.c          | 6 +++++-
 dlls/ntdll/tests/pipe.c    | 4 ++--
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c
index 77381f2..a896843 100644
--- a/dlls/kernel32/tests/pipe.c
+++ b/dlls/kernel32/tests/pipe.c
@@ -2141,7 +2141,7 @@ static void test_overlapped_error(void)
     err = GetLastError();
     ok(ret == FALSE, "ConnectNamedPipe succeeded\n");
     ok(err == ERROR_PIPE_CONNECTED, "expected ERROR_PIPE_CONNECTED, got %u\n", err);
-    todo_wine ok(overlapped.Internal == STATUS_PENDING, "expected STATUS_PENDING, got %08lx\n", overlapped.Internal);
+    ok(overlapped.Internal == STATUS_PENDING, "expected STATUS_PENDING, got %08lx\n", overlapped.Internal);
 
     CloseHandle(file);
     CloseHandle(pipe);
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 46fea51..7e5da59 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -1757,6 +1757,11 @@ NTSTATUS WINAPI NtFsControlFile(HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc
         }
         break;
 
+    case FSCTL_PIPE_LISTEN:
+        status = server_ioctl_file( handle, event, apc, apc_context, io, code,
+                                    in_buffer, in_size, out_buffer, out_size );
+        return status;
+
     case FSCTL_PIPE_IMPERSONATE:
         FIXME("FSCTL_PIPE_IMPERSONATE: impersonating self\n");
         status = RtlImpersonateSelf( SecurityImpersonation );
@@ -1797,7 +1802,6 @@ NTSTATUS WINAPI NtFsControlFile(HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc
         io->Information = 0;
         status = STATUS_SUCCESS;
         break;
-    case FSCTL_PIPE_LISTEN:
     case FSCTL_PIPE_WAIT:
     default:
         status = server_ioctl_file( handle, event, apc, apc_context, io, code,
diff --git a/dlls/ntdll/tests/pipe.c b/dlls/ntdll/tests/pipe.c
index 0551d23..90ba950 100644
--- a/dlls/ntdll/tests/pipe.c
+++ b/dlls/ntdll/tests/pipe.c
@@ -308,7 +308,7 @@ static void test_overlapped(void)
         memset(&iosb, 0x55, sizeof(iosb));
         res = listen_pipe(hPipe, hEvent, &iosb, TRUE);
         ok(res == STATUS_PIPE_CONNECTED, "NtFsControlFile returned %x\n", res);
-        todo_wine ok(U(iosb).Status == 0x55555555, "iosb.Status got changed to %x\n", U(iosb).Status);
+        ok(U(iosb).Status == 0x55555555, "iosb.Status got changed to %x\n", U(iosb).Status);
 
         CloseHandle(hClient);
     }
@@ -392,7 +392,7 @@ static void test_alertable(void)
     todo_wine ok(res == STATUS_CANCELLED, "NtFsControlFile returned %x\n", res);
 
     ok(userapc_called, "user apc didn't run\n");
-    todo_wine ok(U(iosb).Status == 0x55555555, "iosb.Status got changed to %x\n", U(iosb).Status);
+    ok(U(iosb).Status == 0x55555555, "iosb.Status got changed to %x\n", U(iosb).Status);
     ok(WaitForSingleObjectEx(hEvent, 0, TRUE) == WAIT_TIMEOUT, "hEvent signaled\n");
     ok(!ioapc_called, "IOAPC ran\n");
 




More information about the wine-cvs mailing list