Commit Graph

389 Commits

Author SHA1 Message Date
Aaro Altonen 652f1f9642 ws2_32: Improve WSCGetProviderPath() stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45801
Signed-off-by: Aaro Altonen <a.altonen@hotmail.com>
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-31 22:05:01 +02:00
Hans Leidekker a6d9f46b25 ws2_32: Avoid a crash in WS_getaddrinfo when the specified service doesn't exist.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49656
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-11 18:08:13 +02:00
Alistair Leslie-Hughes 587732acb7 ws2_32: Correct returned error code for an invalid socket.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-27 23:28:16 +02:00
Alex Henrie 046475d88e ws2_32/tests: Allow ESP and AH protocols to be missing on Windows.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-27 23:28:16 +02:00
Alex Henrie a16f91ae36 ws2_32: Avoid depending on system getprotoby(name|number) functions.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-17 23:16:52 +02:00
Alex Henrie 73ef942c65 ws2_32/tests: Put WSAAddressToString tests in tables.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 16:18:46 +02:00
Alex Henrie a294f755ce ws2_32: Reimplement inet_ntop on top of ntdll functions.
And add a couple of tests for IPv6 addresses that Windows represents
using dot-decimal notation for the last 32 bits but GNU/Linux does not.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-26 10:30:30 +02:00
Alex Henrie c84e416d23 ws2_32: Don't set output length in WSAStringToAddress on error.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-20 20:11:45 +02:00
Alex Henrie 205e09bc30 ws2_32/tests: Fix typos in test_WSAStringToAddress.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-20 20:10:46 +02:00
Alex Henrie 41e9a8c5fb ws2_32: Reimplement inet_pton on top of ntdll functions.
And add a test to show that inet_pton does not accept hexadecimal IPv4
addresses, and another test to demonstrate that it has the same leading
double colon bug as RtlIpv6StringToAddress.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-19 11:20:48 +02:00
Alex Henrie f21b25ae8e ws2_32: Set WSAEINVAL in InetPtonW if the address string is unparsable.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-19 11:20:48 +02:00
Alex Henrie 3bb824f988 ws2_32: Reimplement WSAStringToAddress on top of ntdll functions.
And add tests to show that the address is always zeroed out even if
there is an error, and that WSAStringToAddress has the same bug with
leading double colons as RtlIpv6StringToAddress.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-18 21:50:44 +02:00
Alex Henrie 2756b68559 ws2_32/tests: Put WSAStringToAddress tests in tables.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-18 21:50:25 +02:00
Bernhard Übelacker 3795484e81 ws2_32: Add stub implementation for WSCGetProviderInfo.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48765
Signed-off-by: Bernhard Übelacker <bernhardu@mailbox.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-20 12:32:17 +01:00
Damjan Jovanovic 37dec9f144 server: Revert b4a1d80ae3 for now.
It breaks too many things.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48357
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-06 22:19:19 +01:00
Damjan Jovanovic b4a1d80ae3 wineserver: Avoid spurious FD_WRITE on repeated calls to WSAEventSelect().
Repeated calls to WSAEventSelect() with FD_WRITE deliver
spurious FD_WRITE events, as the flag isn't held, resulting
in us unnecessarily polling the socket for writability,
despite the fact FD_WRITE should only be delivered (1) initially
on socket creation, and (2) after send[to]() fails with
EWOULDBLOCK and buffer space becomes available.

Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-20 10:33:54 +01:00
Damjan Jovanovic 6e7f357b65 ws2_32: Remove an unneeded todo_wine.
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-19 16:20:39 +01:00
Francois Gouget c52c3d5a36 ws2_32/tests: Fix the spelling of a couple of ok() messages.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-10 20:59:19 +01:00
Hans Leidekker c3bcf83d14 ws2_32: Call the completion routine in GetAddrInfoExW.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-27 14:51:33 +02:00
Damjan Jovanovic c722d819ea ws2_32: Avoid data corruption of WSAPROTOCOL_INFO in ws_protocol_info().
WS_EnterSingleProtocol[A/W]() fills WSAPROTOCOL_INFO with zeroes,
ovewriting what was already there, so in ws_protocol_info(),
populate the address family, socket type and protocol
only AFTER calling it.

Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-01 19:11:49 +02:00
Damjan Jovanovic aa2c84a9db ws2_32: WSARecvMsg allows a NULL control buffer when no control messages arrive.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=43286
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-01 15:03:37 +02:00
Hans Leidekker 72c1cf59a3 ws2_32: Always set overlapped status in AcceptEx.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-22 18:22:15 +01:00
Alexandre Julliard 424a379f64 server: Return a WSA error code in create_socket.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-20 16:26:04 +01:00
Alex Henrie 2be851c955 ws2_32/tests: Mark the IPX-not-supported error code test as todo.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-04 15:04:58 +02:00
André Hentschel 48a7d4d0a4 ws2_32/tests: Use the available ARRAY_SIZE() macro.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-13 22:13:27 +02:00
Hans Leidekker 6d6b4bffb3 ws2_32: Enable IP_DONTFRAGMENT by default for SOCK_STREAM sockets.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-11 00:41:07 +02:00
Akihiro Sagawa f6b6c94add ws2_32: Fix ioctlsocket(FIONREAD) with listening socket.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-27 12:47:17 +01:00
Akihiro Sagawa 13b66d3d1c ws2_32/tests: Add ioctlsocket(FIONREAD) tests with listening socket.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-27 12:47:17 +01:00
Zebediah Figura 80677440cf ws2_32: Only set error codes for triggered events in WSAEnumNetworkEvents().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-20 20:12:35 +01:00
André Hentschel 57b76f0d1a ws2_32/tests: Test with less socket pairs.
about 400 lines less in output

Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-03 12:01:52 +01:00
André Hentschel 67b690dba9 ws2_32/tests: Don't test WSAGetLastError() value on success.
This cuts the test output from around 1600 to around 1100 lines

Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-03 12:01:47 +01:00
Stefan Dösinger 5c421e5fcc ws2_32/tests: Fix the printed value in a few ok lines.
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-22 10:17:37 +01:00
Alex Henrie 414260f356 ws2_32/tests: Initialize bytesReturned to 123456 before a failing test.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-04 11:39:21 +01:00
Alex Henrie 026751313a ws2_32/tests: Drop socket test workarounds for Windows <= 2000.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-04 11:39:20 +01:00
Dmitry Timoshkov 9b0c222f39 server: Deliver an async io APC to any thread alive in the process.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-13 21:14:53 +01:00
Marcus Meissner 0e18800f39 ws2_32/tests: Avoid crashes on flaky/non-present network.
Signed-off-by: Marcus Meissner <meissner@suse.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-13 11:53:56 +01:00
Dmitry Timoshkov b32e8c678b ws2_32/tests: Add some tests for sockets bound to a completion port.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-06 12:15:28 +01:00
Nikolay Sivov 4f8c3d4750 ws2_32/tests: Initialize address length argument before calling recvfrom()/WSARecvFrom() (Coverity).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-03 13:38:30 +02:00
Alexandre Julliard dc203dd833 ws2_32: Lock the user output buffer during receives.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-03 13:38:29 +02:00
Alexandre Julliard 1c72e594e3 ws2_32/tests: Add some tests for write watches.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-21 19:50:21 +02:00
Huw Davies 2910dcea89 ws2_32: Don't return synchronously if the connection is refused.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-12 19:33:44 +09:00
Jacek Caban eb32d1a52b ws2_32/tests: Added GetAddrInfoExW tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-02 13:52:37 +02:00
Kimmo Myllyvirta 32334704e8 ws2_32: Set return size when calling WSAIoctl with WS_SIO_GET_EXTENSION_FUNCTION_POINTER.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-12 11:44:41 +02:00
Jacek Caban 82e6713b75 server: Don't allow APCs on objects associated with completion port.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-10 20:51:11 +02:00
Francois Gouget 32c6d87295 ws2_32/tests: A spelling fix in a comment.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-06 18:50:47 +02:00
Alexandre Julliard 33a4d90138 ws2_32/tests: Print IP addresses as unsigned.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-27 19:12:10 +02:00
Owen Rudge 93323bcf6c ws2_32/tests: Test IP address conversion in getaddrinfo.
Signed-off-by: Bruno Jesus <bjesus@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-13 10:26:37 +02:00
Jacek Caban efdb722c17 ws2_32: Don't try to match host name in getaddrinfo if AI_NUMERICHOST hint is specified.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-16 18:33:47 +02:00
Stefan Dösinger 7a1142035d ws2_32: Don't post completion packet if receiving fails with error immediately.
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Bruno Jesus <bjesus@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-16 12:08:52 +02:00
Jacek Caban b9f6f3896a ws2_32/tests: Added WSARecv tests using completion function.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-05 19:15:40 +02:00