Commit 3dacf821 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

server: Add FILE_SKIP_SET_EVENT_ON_HANDLE support.

parent 455de702
......@@ -2661,8 +2661,8 @@ NTSTATUS WINAPI NtSetInformationFile(HANDLE handle, PIO_STATUS_BLOCK io,
{
FILE_IO_COMPLETION_NOTIFICATION_INFORMATION *info = ptr;
if (info->Flags & ~FILE_SKIP_COMPLETION_PORT_ON_SUCCESS)
FIXME( "Unsupported completion flags %x\n", info->Flags );
if (info->Flags & FILE_SKIP_SET_USER_EVENT_ON_FAST_IO)
FIXME( "FILE_SKIP_SET_USER_EVENT_ON_FAST_IO not supported\n" );
SERVER_START_REQ( set_fd_completion_mode )
{
......
......@@ -1423,12 +1423,10 @@ static void test_completion(void)
info.Flags = FILE_SKIP_SET_EVENT_ON_HANDLE;
status = pNtSetInformationFile(client, &io, &info, sizeof(info), FileIoCompletionNotificationInformation);
ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %08x\n", status);
todo_wine
ok(!is_signaled(client), "client is not signaled\n");
ret = WriteFile(pipe, buf, sizeof(buf), &num_bytes, NULL);
ok(ret, "WriteFile failed, error %u\n", GetLastError());
todo_wine
ok(!is_signaled(client), "client is signaled\n");
test_queued_completion(port, &io, STATUS_SUCCESS, sizeof(buf));
......@@ -1439,12 +1437,10 @@ static void test_completion(void)
ret = WriteFile(client, buf, 1, &num_bytes, NULL);
ok(ret, "WriteFile failed, error %u\n", GetLastError());
todo_wine
ok(!is_signaled(client), "client is signaled\n");
ret = WriteFile(pipe, buf, sizeof(buf), &num_bytes, NULL);
ok(ret, "WriteFile failed, error %u\n", GetLastError());
todo_wine
ok(!is_signaled(client), "client is signaled\n");
CloseHandle(port);
......
......@@ -1964,6 +1964,7 @@ int is_fd_removable( struct fd *fd )
/* set or clear the fd signaled state */
void set_fd_signaled( struct fd *fd, int signaled )
{
if (fd->comp_flags & FILE_SKIP_SET_EVENT_ON_HANDLE) return;
fd->signaled = signaled;
if (signaled) wake_up( fd->user, 0 );
}
......@@ -2647,7 +2648,9 @@ DECL_HANDLER(set_fd_completion_mode)
{
if (is_fd_overlapped( fd ))
{
/* removing COMPLETION_SKIP_ON_SUCCESS is not allowed */
if (req->flags & FILE_SKIP_SET_EVENT_ON_HANDLE)
set_fd_signaled( fd, 0 );
/* removing flags is not allowed */
fd->comp_flags |= req->flags & ( FILE_SKIP_COMPLETION_PORT_ON_SUCCESS
| FILE_SKIP_SET_EVENT_ON_HANDLE
| FILE_SKIP_SET_USER_EVENT_ON_FAST_IO );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment