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.
This bug was found through Python's test suite, in particular its test.test_socket.TestSocketSharing unit test.
Signed-off-by: Damjan Jovanovic damjan.jov@gmail.com --- dlls/ws2_32/socket.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=54995
Your paranoid android.
=== debian10 (32 bit report) ===
ws2_32: sock.c:1672: Test succeeded inside todo block: socket family invalid, expected 23 received 23 sock.c:1672: Test succeeded inside todo block: socket family invalid, expected 23 received 23 sock.c:3053: Test failed: Test[1]: expected 2, got 0 sock.c:3053: Test failed: Test[2]: expected 2, got 0 sock.c:3053: Test failed: Test[1]: expected 2, got 0 sock.c:3053: Test failed: Test[2]: expected 2, got 0
=== debian10 (32 bit Chinese:China report) ===
ws2_32: sock.c:1672: Test succeeded inside todo block: socket family invalid, expected 23 received 23 sock.c:1672: Test succeeded inside todo block: socket family invalid, expected 23 received 23
=== debian10 (32 bit WoW report) ===
ws2_32: sock.c:1672: Test succeeded inside todo block: socket family invalid, expected 23 received 23 sock.c:1672: Test succeeded inside todo block: socket family invalid, expected 23 received 23
=== debian10 (64 bit WoW report) ===
ws2_32: sock.c:1672: Test succeeded inside todo block: socket family invalid, expected 23 received 23 sock.c:1672: Test succeeded inside todo block: socket family invalid, expected 23 received 23