ws2_32: Use IOCTL_WINE_AFD_COMPLETE_ASYNC in SIO_GET_EXTENSION_FUNCTION_POINTER.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
be8bd6f498
commit
135ae49ff4
|
@ -3515,29 +3515,29 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID
|
|||
EXTENSION_FUNCTION(WSAID_WSASENDMSG, WSASendMsg)
|
||||
};
|
||||
#undef EXTENSION_FUNCTION
|
||||
BOOL found = FALSE;
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(guid_funcs); i++)
|
||||
{
|
||||
if (IsEqualGUID(&guid_funcs[i].guid, in_buff))
|
||||
{
|
||||
found = TRUE;
|
||||
break;
|
||||
NTSTATUS status = STATUS_SUCCESS;
|
||||
DWORD ret = 0;
|
||||
|
||||
TRACE( "returning %s\n", guid_funcs[i].name );
|
||||
*(void **)out_buff = guid_funcs[i].func_ptr;
|
||||
|
||||
ret = server_ioctl_sock( s, IOCTL_AFD_WINE_COMPLETE_ASYNC, &status, sizeof(status),
|
||||
NULL, 0, ret_size, overlapped, completion );
|
||||
*ret_size = sizeof(void *);
|
||||
SetLastError( ret );
|
||||
return ret ? -1 : 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (found)
|
||||
{
|
||||
TRACE("-> got %s\n", guid_funcs[i].name);
|
||||
*(void **)out_buff = guid_funcs[i].func_ptr;
|
||||
total = sizeof(void *);
|
||||
break;
|
||||
}
|
||||
|
||||
FIXME("SIO_GET_EXTENSION_FUNCTION_POINTER %s: stub\n", debugstr_guid(in_buff));
|
||||
status = WSAEOPNOTSUPP;
|
||||
break;
|
||||
SetLastError( WSAEOPNOTSUPP );
|
||||
return -1;
|
||||
}
|
||||
case WS_SIO_KEEPALIVE_VALS:
|
||||
{
|
||||
|
|
|
@ -4231,7 +4231,7 @@ static void test_get_extension_func(void)
|
|||
ret = WSAIoctl(s, SIO_GET_EXTENSION_FUNCTION_POINTER, &acceptex_guid, sizeof(GUID),
|
||||
&func, sizeof(func), &size, NULL, NULL);
|
||||
ok(!ret, "expected success\n");
|
||||
todo_wine ok(!WSAGetLastError(), "got error %u\n", WSAGetLastError());
|
||||
ok(!WSAGetLastError(), "got error %u\n", WSAGetLastError());
|
||||
ok(size == sizeof(func), "got size %u\n", size);
|
||||
|
||||
WSASetLastError(0xdeadbeef);
|
||||
|
@ -4241,16 +4241,16 @@ static void test_get_extension_func(void)
|
|||
ret = WSAIoctl(s, SIO_GET_EXTENSION_FUNCTION_POINTER, &acceptex_guid, sizeof(GUID),
|
||||
&func, sizeof(func), &size, &overlapped, NULL);
|
||||
ok(!ret, "expected success\n");
|
||||
todo_wine ok(!WSAGetLastError(), "got error %u\n", WSAGetLastError());
|
||||
ok(!WSAGetLastError(), "got error %u\n", WSAGetLastError());
|
||||
ok(size == sizeof(func), "got size %u\n", size);
|
||||
|
||||
ret = GetQueuedCompletionStatus(port, &size, &key, &overlapped_ptr, 0);
|
||||
ok(ret, "got error %u\n", GetLastError());
|
||||
todo_wine ok(!size, "got size %u\n", size);
|
||||
ok(!size, "got size %u\n", size);
|
||||
ok(key == 123, "got key %Iu\n", key);
|
||||
ok(overlapped_ptr == &overlapped, "got overlapped %p\n", overlapped_ptr);
|
||||
ok(!overlapped.Internal, "got status %#x\n", (NTSTATUS)overlapped.Internal);
|
||||
todo_wine ok(!overlapped.InternalHigh, "got size %Iu\n", overlapped.InternalHigh);
|
||||
ok(!overlapped.InternalHigh, "got size %Iu\n", overlapped.InternalHigh);
|
||||
|
||||
size = 0xdeadbeef;
|
||||
overlapped.Internal = 0xdeadbeef;
|
||||
|
@ -4260,12 +4260,12 @@ static void test_get_extension_func(void)
|
|||
ok(ret == -1, "expected failure\n");
|
||||
todo_wine ok(WSAGetLastError() == WSAEINVAL, "got error %u\n", WSAGetLastError());
|
||||
ok(size == 0xdeadbeef, "got size %u\n", size);
|
||||
todo_wine ok(overlapped.Internal == 0xdeadbeef, "got status %#x\n", (NTSTATUS)overlapped.Internal);
|
||||
todo_wine ok(overlapped.InternalHigh == 0xdeadbeef, "got size %Iu\n", overlapped.InternalHigh);
|
||||
ok(overlapped.Internal == 0xdeadbeef, "got status %#x\n", (NTSTATUS)overlapped.Internal);
|
||||
ok(overlapped.InternalHigh == 0xdeadbeef, "got size %Iu\n", overlapped.InternalHigh);
|
||||
|
||||
ret = GetQueuedCompletionStatus(port, &size, &key, &overlapped_ptr, 0);
|
||||
ok(!ret, "expected failure\n");
|
||||
todo_wine ok(GetLastError() == WAIT_TIMEOUT, "got error %u\n", WSAGetLastError());
|
||||
ok(GetLastError() == WAIT_TIMEOUT, "got error %u\n", WSAGetLastError());
|
||||
|
||||
CloseHandle(port);
|
||||
closesocket(s);
|
||||
|
@ -4285,14 +4285,11 @@ static void test_get_extension_func(void)
|
|||
ok(size == sizeof(func), "got size %u\n", size);
|
||||
|
||||
ret = SleepEx(0, TRUE);
|
||||
todo_wine ok(ret == WAIT_IO_COMPLETION, "got %d\n", ret);
|
||||
if (ret == WAIT_IO_COMPLETION)
|
||||
{
|
||||
ok(apc_count == 1, "APC was called %u times\n", apc_count);
|
||||
ok(!apc_error, "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);
|
||||
}
|
||||
ok(ret == WAIT_IO_COMPLETION, "got %d\n", ret);
|
||||
ok(apc_count == 1, "APC was called %u times\n", apc_count);
|
||||
ok(!apc_error, "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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue