Francois Gouget : ws2_32: Add support for WSA_FLAG_NO_HANDLE_INHERIT.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Mar 17 11:01:58 CDT 2015


Module: wine
Branch: master
Commit: ae6e1e2e38a50c6c7b14cb1febd421ba744197e5
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ae6e1e2e38a50c6c7b14cb1febd421ba744197e5

Author: Francois Gouget <fgouget at free.fr>
Date:   Mon Mar 16 17:45:40 2015 +0100

ws2_32: Add support for WSA_FLAG_NO_HANDLE_INHERIT.

---

 dlls/ws2_32/socket.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index 960556d..e7e3de5 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -6386,8 +6386,8 @@ SOCKET WINAPI WSASocketW(int af, int type, int protocol,
         req->type       = unixtype;
         req->protocol   = protocol;
         req->access     = GENERIC_READ|GENERIC_WRITE|SYNCHRONIZE;
-        req->attributes = OBJ_INHERIT;
-        req->flags      = dwFlags;
+        req->attributes = (dwFlags & WSA_FLAG_NO_HANDLE_INHERIT) ? 0 : OBJ_INHERIT;
+        req->flags      = dwFlags & ~WSA_FLAG_NO_HANDLE_INHERIT;
         set_error( wine_server_call( req ) );
         ret = HANDLE2SOCKET( wine_server_ptr_handle( reply->handle ));
     }




More information about the wine-cvs mailing list