Jacek Caban : server: Use server side named pipe implementation in byte mode.
Alexandre Julliard
julliard at winehq.org
Wed Oct 4 15:37:15 CDT 2017
Module: wine
Branch: master
Commit: 7eb785416193f7ca154872222b9cfcd3db7a7418
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7eb785416193f7ca154872222b9cfcd3db7a7418
Author: Jacek Caban <jacek at codeweavers.com>
Date: Wed Oct 4 15:18:29 2017 +0200
server: Use server side named pipe implementation in byte mode.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/kernel32/tests/pipe.c | 6 +-----
dlls/ntdll/tests/pipe.c | 6 ++----
server/named_pipe.c | 5 +++--
3 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c
index 18ffa7a..87e64ef 100644
--- a/dlls/kernel32/tests/pipe.c
+++ b/dlls/kernel32/tests/pipe.c
@@ -2576,7 +2576,6 @@ static void test_readfileex_pending(void)
SetLastError(0xdeadbeef);
ret = ReadFile(server, read_buf, 0, &num_bytes, &overlapped);
ok(!ret, "ReadFile should fail\n");
-todo_wine
ok(GetLastError() == ERROR_IO_PENDING, "expected ERROR_IO_PENDING, got %d\n", GetLastError());
ok(num_bytes == 0, "bytes %u\n", num_bytes);
ok((NTSTATUS)overlapped.Internal == STATUS_PENDING, "expected STATUS_PENDING, got %#lx\n", overlapped.Internal);
@@ -2592,11 +2591,9 @@ todo_wine
ok(num_bytes == 1, "bytes %u\n", num_bytes);
wait = WaitForSingleObject(event, 100);
-todo_wine
ok(wait == WAIT_OBJECT_0, "WaitForSingleObject returned %x\n", wait);
ok(num_bytes == 1, "bytes %u\n", num_bytes);
-todo_wine
ok((NTSTATUS)overlapped.Internal == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", overlapped.Internal);
ok(overlapped.InternalHigh == 0, "expected 0, got %lu\n", overlapped.InternalHigh);
@@ -3132,6 +3129,5 @@ START_TEST(pipe)
test_readfileex_pending();
test_overlapped_transport(TRUE, FALSE);
test_overlapped_transport(TRUE, TRUE);
- if (broken(1)) /* FIXME: Remove once Wine is ready. */
- test_overlapped_transport(FALSE, FALSE);
+ test_overlapped_transport(FALSE, FALSE);
}
diff --git a/dlls/ntdll/tests/pipe.c b/dlls/ntdll/tests/pipe.c
index 897c44b..9628cc2 100644
--- a/dlls/ntdll/tests/pipe.c
+++ b/dlls/ntdll/tests/pipe.c
@@ -726,7 +726,7 @@ static void WINAPI apc( void *arg, IO_STATUS_BLOCK *iosb, ULONG reserved )
ok( !reserved, "reserved is not 0: %x\n", reserved );
}
-static void test_peek(HANDLE pipe, BOOL is_msgmode)
+static void test_peek(HANDLE pipe)
{
FILE_PIPE_PEEK_BUFFER buf;
IO_STATUS_BLOCK iosb;
@@ -745,7 +745,6 @@ static void test_peek(HANDLE pipe, BOOL is_msgmode)
ok(!status || status == STATUS_PENDING, "NtFsControlFile failed: %x\n", status);
ok(buf.ReadDataAvailable == 1, "ReadDataAvailable = %u\n", buf.ReadDataAvailable);
ok(!iosb.Status, "iosb.Status = %x\n", iosb.Status);
- todo_wine_if(!is_msgmode)
ok(is_signaled(event), "event is not signaled\n");
CloseHandle(event);
@@ -857,7 +856,7 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
ret = WriteFile( write, buffer, 1, &written, NULL );
ok(ret && written == 1, "WriteFile error %d\n", GetLastError());
- test_peek(read, pipe_type & PIPE_TYPE_MESSAGE);
+ test_peek(read);
status = NtReadFile( read, event, apc, &apc_count, &iosb, buffer, 1, NULL, NULL );
ok( status == STATUS_SUCCESS, "wrong status %x\n", status );
@@ -984,7 +983,6 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
ok( !apc_count, "apc was called\n" );
CloseHandle( write );
Sleep(1); /* FIXME: needed for wine to run the i/o apc */
- todo_wine_if(!(pipe_type & PIPE_TYPE_MESSAGE) && (pipe_flags & PIPE_ACCESS_OUTBOUND))
ok( U(iosb).Status == STATUS_PIPE_BROKEN, "wrong status %x\n", U(iosb).Status );
ok( iosb.Information == 0, "wrong info %lu\n", iosb.Information );
ok( is_signaled( event ), "event is not signaled\n" );
diff --git a/server/named_pipe.c b/server/named_pipe.c
index a98041e..3566663 100644
--- a/server/named_pipe.c
+++ b/server/named_pipe.c
@@ -294,10 +294,11 @@ static const struct fd_ops named_pipe_device_fd_ops =
default_fd_reselect_async /* reselect_async */
};
-/* Returns if we handle I/O via server calls. Currently message-mode pipes are handled this way. */
+/* Returns if we handle I/O via server calls.
+ * FIXME: no longer needed. */
static int use_server_io( struct pipe_end *pipe_end )
{
- return pipe_end->flags & NAMED_PIPE_MESSAGE_STREAM_WRITE;
+ return 1;
}
static void named_pipe_dump( struct object *obj, int verbose )
More information about the wine-cvs
mailing list