ws2_32-WSACleanup: Fix compatibility with server-Desktop_Refcount patchset.

This commit is contained in:
Sebastian Lackner 2015-12-05 23:56:38 +01:00
parent dea2594156
commit 2e17709095
3 changed files with 17 additions and 6 deletions

View File

@ -1771,6 +1771,13 @@ if test "$enable_category_stable" -eq 1; then
enable_ws2_32_WriteWatches=1
fi
if test "$enable_ws2_32_WSACleanup" -eq 1; then
if test "$enable_server_Desktop_Refcount" -gt 1; then
abort "Patchset server-Desktop_Refcount disabled, but ws2_32-WSACleanup depends on that."
fi
enable_server_Desktop_Refcount=1
fi
if test "$enable_ws2_32_TransmitFile" -eq 1; then
if test "$enable_server_Desktop_Refcount" -gt 1; then
abort "Patchset server-Desktop_Refcount disabled, but ws2_32-TransmitFile depends on that."
@ -6742,6 +6749,9 @@ fi
# Patchset ws2_32-WSACleanup
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * server-Desktop_Refcount
# |
# | This patchset fixes the following Wine bugs:
# | * [#18670] Properly close sockets when WSACleanup is called
# |

View File

@ -1,4 +1,4 @@
From 9b2d1b5533f52cee4a9445ed83a17e16b6da8b85 Mon Sep 17 00:00:00 2001
From 2a08bedec6070b9001315dc6a7505de150c48a88 Mon Sep 17 00:00:00 2001
From: Matt Durgavich <mattdurgavich@gmail.com>
Date: Sun, 30 Aug 2015 11:04:08 -0400
Subject: ws2_32: Proper WSACleanup implementation using wineserver function
@ -46,7 +46,7 @@ index d31f0b4..ea45397 100644
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index 3c66f7d..e3732a3 100644
index 00fac77..ccd5790 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -1149,18 +1149,17 @@ static void test_WithWSAStartup(void)
@ -90,7 +90,7 @@ index 3c66f7d..e3732a3 100644
for (i = 0; i < socks; i++)
{
diff --git a/server/protocol.def b/server/protocol.def
index aa37c66..058111a 100644
index 04814c9..cfd40a0 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -942,6 +942,9 @@ struct rawinput_device
@ -104,10 +104,10 @@ index aa37c66..058111a 100644
/* Set a handle information */
@REQ(set_handle_info)
diff --git a/server/sock.c b/server/sock.c
index 1767dea..090c753 100644
index 57d3d93..4e95911 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -1388,3 +1388,12 @@ DECL_HANDLER(get_socket_info)
@@ -1390,3 +1390,12 @@ DECL_HANDLER(get_socket_info)
release_object( &sock->obj );
}
@ -117,7 +117,7 @@ index 1767dea..090c753 100644
+ unsigned int index = 0;
+ obj_handle_t sock;
+
+ while ((sock = enumerate_handles(current->process, &sock_ops, &index)))
+ while ((sock = enumerate_handles(current->process, &sock_ops, &index, NULL)))
+ close_handle(current->process, sock);
+}
--

View File

@ -1 +1,2 @@
Fixes: [18670] Properly close sockets when WSACleanup is called
Depends: server-Desktop_Refcount