Updated ws2_32-WSACleanup patchset

This commit is contained in:
Alistair Leslie-Hughes 2018-02-21 14:01:33 +11:00
parent 9c74ae13d4
commit 669b58c813

View File

@ -1,4 +1,4 @@
From 74d113bd4472d42dec951a6340dc98f9719c0e2f Mon Sep 17 00:00:00 2001
From cbff2078d971bf23a0a6b289f544cd13fbb26873 Mon Sep 17 00:00:00 2001
From: Matt Durgavich <mattdurgavich@gmail.com>
Date: Sun, 30 Aug 2015 11:04:08 -0400
Subject: [PATCH] ws2_32: Proper WSACleanup implementation using wineserver
@ -6,16 +6,16 @@ Subject: [PATCH] ws2_32: Proper WSACleanup implementation using wineserver
---
dlls/ws2_32/socket.c | 22 ++++++++++++++++------
dlls/ws2_32/tests/sock.c | 13 +++++++------
dlls/ws2_32/tests/sock.c | 15 +++++++--------
server/protocol.def | 3 +++
server/sock.c | 9 +++++++++
4 files changed, 35 insertions(+), 12 deletions(-)
4 files changed, 35 insertions(+), 14 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index 058b12d..6bdfd8b 100644
index e39901d..c013258 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -1692,13 +1692,23 @@ int WINAPI WSAStartup(WORD wVersionRequested, LPWSADATA lpWSAData)
@@ -1663,13 +1663,23 @@ int WINAPI WSAStartup(WORD wVersionRequested, LPWSADATA lpWSAData)
*/
INT WINAPI WSACleanup(void)
{
@ -46,10 +46,10 @@ index 058b12d..6bdfd8b 100644
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index be2a02d..a9788b9 100644
index 7c55c21..f61df89f 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -1222,18 +1222,17 @@ static void test_WithWSAStartup(void)
@@ -1218,18 +1218,17 @@ static void test_WithWSAStartup(void)
ok(res == 0, "WSAStartup() failed unexpectedly: %d\n", res);
/* show that sockets are destroyed automatically after WSACleanup */
@ -70,7 +70,7 @@ index be2a02d..a9788b9 100644
/* Check that all sockets were destroyed */
for (i = 0; i < socks; i++)
@@ -1253,9 +1252,11 @@ static void test_WithWSAStartup(void)
@@ -1249,14 +1248,14 @@ static void test_WithWSAStartup(void)
SetLastError(0xdeadbeef);
res = getsockname(sock, (struct sockaddr *)&saddr, &size);
error = WSAGetLastError();
@ -85,11 +85,16 @@ index be2a02d..a9788b9 100644
}
}
- }
-
/* While wine is not fixed, close all sockets manually */
for (i = 0; i < socks; i++)
{
diff --git a/server/protocol.def b/server/protocol.def
index 88fec87..fd9d2d8 100644
index 35824ae..199f470 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -1015,6 +1015,9 @@ struct rawinput_device
@@ -987,6 +987,9 @@ struct rawinput_device
obj_handle_t handle; /* handle to close */
@END
@ -100,10 +105,10 @@ index 88fec87..fd9d2d8 100644
/* Set a handle information */
@REQ(set_handle_info)
diff --git a/server/sock.c b/server/sock.c
index 0a7d4c0..f8920fc 100644
index 84f54f6..9ad4e87 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -1405,3 +1405,12 @@ DECL_HANDLER(get_socket_info)
@@ -1355,3 +1355,12 @@ DECL_HANDLER(get_socket_info)
release_object( &sock->obj );
}