Commit 135ae49f authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

ws2_32: Use IOCTL_WINE_AFD_COMPLETE_ASYNC in SIO_GET_EXTENSION_FUNCTION_POINTER.

parent be8bd6f4
...@@ -3515,29 +3515,29 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID ...@@ -3515,29 +3515,29 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID
EXTENSION_FUNCTION(WSAID_WSASENDMSG, WSASendMsg) EXTENSION_FUNCTION(WSAID_WSASENDMSG, WSASendMsg)
}; };
#undef EXTENSION_FUNCTION #undef EXTENSION_FUNCTION
BOOL found = FALSE;
unsigned int i; unsigned int i;
for (i = 0; i < ARRAY_SIZE(guid_funcs); i++) for (i = 0; i < ARRAY_SIZE(guid_funcs); i++)
{ {
if (IsEqualGUID(&guid_funcs[i].guid, in_buff)) if (IsEqualGUID(&guid_funcs[i].guid, in_buff))
{ {
found = TRUE; NTSTATUS status = STATUS_SUCCESS;
break; DWORD ret = 0;
}
}
if (found) TRACE( "returning %s\n", guid_funcs[i].name );
{ *(void **)out_buff = guid_funcs[i].func_ptr;
TRACE("-> got %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),
total = sizeof(void *); NULL, 0, ret_size, overlapped, completion );
break; *ret_size = sizeof(void *);
SetLastError( ret );
return ret ? -1 : 0;
}
} }
FIXME("SIO_GET_EXTENSION_FUNCTION_POINTER %s: stub\n", debugstr_guid(in_buff)); FIXME("SIO_GET_EXTENSION_FUNCTION_POINTER %s: stub\n", debugstr_guid(in_buff));
status = WSAEOPNOTSUPP; SetLastError( WSAEOPNOTSUPP );
break; return -1;
} }
case WS_SIO_KEEPALIVE_VALS: case WS_SIO_KEEPALIVE_VALS:
{ {
......
...@@ -4231,7 +4231,7 @@ static void test_get_extension_func(void) ...@@ -4231,7 +4231,7 @@ static void test_get_extension_func(void)
ret = WSAIoctl(s, SIO_GET_EXTENSION_FUNCTION_POINTER, &acceptex_guid, sizeof(GUID), ret = WSAIoctl(s, SIO_GET_EXTENSION_FUNCTION_POINTER, &acceptex_guid, sizeof(GUID),
&func, sizeof(func), &size, NULL, NULL); &func, sizeof(func), &size, NULL, NULL);
ok(!ret, "expected success\n"); 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); ok(size == sizeof(func), "got size %u\n", size);
WSASetLastError(0xdeadbeef); WSASetLastError(0xdeadbeef);
...@@ -4241,16 +4241,16 @@ static void test_get_extension_func(void) ...@@ -4241,16 +4241,16 @@ static void test_get_extension_func(void)
ret = WSAIoctl(s, SIO_GET_EXTENSION_FUNCTION_POINTER, &acceptex_guid, sizeof(GUID), ret = WSAIoctl(s, SIO_GET_EXTENSION_FUNCTION_POINTER, &acceptex_guid, sizeof(GUID),
&func, sizeof(func), &size, &overlapped, NULL); &func, sizeof(func), &size, &overlapped, NULL);
ok(!ret, "expected success\n"); 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); ok(size == sizeof(func), "got size %u\n", size);
ret = GetQueuedCompletionStatus(port, &size, &key, &overlapped_ptr, 0); ret = GetQueuedCompletionStatus(port, &size, &key, &overlapped_ptr, 0);
ok(ret, "got error %u\n", GetLastError()); 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(key == 123, "got key %Iu\n", key);
ok(overlapped_ptr == &overlapped, "got overlapped %p\n", overlapped_ptr); ok(overlapped_ptr == &overlapped, "got overlapped %p\n", overlapped_ptr);
ok(!overlapped.Internal, "got status %#x\n", (NTSTATUS)overlapped.Internal); 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; size = 0xdeadbeef;
overlapped.Internal = 0xdeadbeef; overlapped.Internal = 0xdeadbeef;
...@@ -4260,12 +4260,12 @@ static void test_get_extension_func(void) ...@@ -4260,12 +4260,12 @@ static void test_get_extension_func(void)
ok(ret == -1, "expected failure\n"); ok(ret == -1, "expected failure\n");
todo_wine ok(WSAGetLastError() == WSAEINVAL, "got error %u\n", WSAGetLastError()); todo_wine ok(WSAGetLastError() == WSAEINVAL, "got error %u\n", WSAGetLastError());
ok(size == 0xdeadbeef, "got size %u\n", size); ok(size == 0xdeadbeef, "got size %u\n", size);
todo_wine ok(overlapped.Internal == 0xdeadbeef, "got status %#x\n", (NTSTATUS)overlapped.Internal); 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.InternalHigh == 0xdeadbeef, "got size %Iu\n", overlapped.InternalHigh);
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 ok(GetLastError() == WAIT_TIMEOUT, "got error %u\n", WSAGetLastError()); ok(GetLastError() == WAIT_TIMEOUT, "got error %u\n", WSAGetLastError());
CloseHandle(port); CloseHandle(port);
closesocket(s); closesocket(s);
...@@ -4285,14 +4285,11 @@ static void test_get_extension_func(void) ...@@ -4285,14 +4285,11 @@ static void test_get_extension_func(void)
ok(size == sizeof(func), "got size %u\n", size); ok(size == sizeof(func), "got size %u\n", size);
ret = SleepEx(0, TRUE); ret = SleepEx(0, TRUE);
todo_wine ok(ret == WAIT_IO_COMPLETION, "got %d\n", ret); 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_count == 1, "APC was called %u times\n", apc_count); ok(!apc_size, "got APC size %u\n", apc_size);
ok(!apc_error, "got APC error %u\n", apc_error); ok(apc_overlapped == &overlapped, "got APC overlapped %p\n", apc_overlapped);
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);
} }
......
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