Commit 0a4a7c43 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

ws2_32: Return WSAEOPNOTSUPP in FIOASYNC.

parent b8bb6bae
...@@ -3276,11 +3276,6 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID ...@@ -3276,11 +3276,6 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID
return ret ? -1 : 0; return ret ? -1 : 0;
} }
case WS_FIOASYNC:
WARN("Warning: WS1.1 shouldn't be using async I/O\n");
SetLastError(WSAEINVAL);
return SOCKET_ERROR;
case WS_SIO_GET_INTERFACE_LIST: case WS_SIO_GET_INTERFACE_LIST:
{ {
DWORD ret; DWORD ret;
......
...@@ -4136,35 +4136,27 @@ static void test_unsupported_ioctls(void) ...@@ -4136,35 +4136,27 @@ static void test_unsupported_ioctls(void)
size = 0xdeadbeef; size = 0xdeadbeef;
ret = WSAIoctl(s, codes[i], NULL, 0, NULL, 0, &size, NULL, NULL); ret = WSAIoctl(s, codes[i], NULL, 0, NULL, 0, &size, NULL, NULL);
ok(ret == -1, "expected failure\n"); ok(ret == -1, "expected failure\n");
todo_wine_if (codes[i] == FIOASYNC) ok(WSAGetLastError() == WSAEOPNOTSUPP, "got error %u\n", WSAGetLastError());
ok(WSAGetLastError() == WSAEOPNOTSUPP, "got error %u\n", WSAGetLastError()); ok(!size, "got size %u\n", size);
todo_wine_if (codes[i] == FIOASYNC)
ok(!size, "got size %u\n", size);
WSASetLastError(0xdeadbeef); WSASetLastError(0xdeadbeef);
size = 0xdeadbeef; size = 0xdeadbeef;
overlapped.Internal = 0xdeadbeef; overlapped.Internal = 0xdeadbeef;
overlapped.InternalHigh = 0xdeadbeef; overlapped.InternalHigh = 0xdeadbeef;
ret = WSAIoctl(s, codes[i], NULL, 0, NULL, 0, &size, &overlapped, NULL); ret = WSAIoctl(s, codes[i], NULL, 0, NULL, 0, &size, &overlapped, NULL);
ok(ret == -1, "expected failure\n"); ok(ret == -1, "expected failure\n");
todo_wine_if (codes[i] == FIOASYNC) ok(WSAGetLastError() == ERROR_IO_PENDING, "got error %u\n", WSAGetLastError());
ok(WSAGetLastError() == ERROR_IO_PENDING, "got error %u\n", WSAGetLastError());
ok(size == 0xdeadbeef, "got size %u\n", size); ok(size == 0xdeadbeef, "got size %u\n", size);
ret = GetQueuedCompletionStatus(port, &size, &key, &overlapped_ptr, 0); ret = GetQueuedCompletionStatus(port, &size, &key, &overlapped_ptr, 0);
ok(!ret, "expected failure\n"); ok(!ret, "expected failure\n");
todo_wine_if (codes[i] == FIOASYNC) ok(GetLastError() == ERROR_NOT_SUPPORTED, "got error %u\n", GetLastError());
ok(GetLastError() == ERROR_NOT_SUPPORTED, "got error %u\n", GetLastError()); ok(!size, "got size %u\n", size);
todo_wine_if (codes[i] == FIOASYNC)
ok(!size, "got size %u\n", size);
ok(key == 123, "got key %Iu\n", key); ok(key == 123, "got key %Iu\n", key);
todo_wine_if (codes[i] == FIOASYNC) ok(overlapped_ptr == &overlapped, "got overlapped %p\n", overlapped_ptr);
ok(overlapped_ptr == &overlapped, "got overlapped %p\n", overlapped_ptr); ok((NTSTATUS)overlapped.Internal == STATUS_NOT_SUPPORTED,
todo_wine_if (codes[i] == FIOASYNC) "got status %#x\n", (NTSTATUS)overlapped.Internal);
ok((NTSTATUS)overlapped.Internal == STATUS_NOT_SUPPORTED, ok(!overlapped.InternalHigh, "got size %Iu\n", overlapped.InternalHigh);
"got status %#x\n", (NTSTATUS)overlapped.Internal);
todo_wine_if (codes[i] == FIOASYNC)
ok(!overlapped.InternalHigh, "got size %Iu\n", overlapped.InternalHigh);
CloseHandle(port); CloseHandle(port);
closesocket(s); closesocket(s);
...@@ -4179,20 +4171,15 @@ static void test_unsupported_ioctls(void) ...@@ -4179,20 +4171,15 @@ static void test_unsupported_ioctls(void)
size = 0xdeadbeef; size = 0xdeadbeef;
ret = WSAIoctl(s, codes[i], NULL, 0, NULL, 0, &size, &overlapped, socket_apc); ret = WSAIoctl(s, codes[i], NULL, 0, NULL, 0, &size, &overlapped, socket_apc);
ok(ret == -1, "expected failure\n"); ok(ret == -1, "expected failure\n");
todo_wine_if (codes[i] == FIOASYNC) ok(WSAGetLastError() == ERROR_IO_PENDING, "got error %u\n", WSAGetLastError());
ok(WSAGetLastError() == ERROR_IO_PENDING, "got error %u\n", WSAGetLastError());
ok(size == 0xdeadbeef, "got size %u\n", size); ok(size == 0xdeadbeef, "got size %u\n", size);
ret = SleepEx(0, TRUE); ret = SleepEx(0, TRUE);
todo_wine_if (codes[i] == FIOASYNC) ok(ret == WAIT_IO_COMPLETION, "got %d\n", ret);
ok(ret == WAIT_IO_COMPLETION, "got %d\n", ret); ok(apc_count == 1, "APC was called %u times\n", apc_count);
if (ret == WAIT_IO_COMPLETION) ok(apc_error == WSAEOPNOTSUPP, "got APC error %u\n", apc_error);
{ ok(!apc_size, "got APC size %u\n", apc_size);
ok(apc_count == 1, "APC was called %u times\n", apc_count); ok(apc_overlapped == &overlapped, "got APC overlapped %p\n", apc_overlapped);
ok(apc_error == WSAEOPNOTSUPP, "got APC error %u\n", apc_error);
ok(!apc_size, "got APC size %u\n", apc_size);
ok(apc_overlapped == &overlapped, "got APC overlapped %p\n", apc_overlapped);
}
closesocket(s); closesocket(s);
winetest_pop_context(); winetest_pop_context();
......
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