Sebastian Lackner : ws2_32: Avoid kernel32 functions in system APC calls.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Mar 6 06:27:29 CST 2015
Module: wine
Branch: master
Commit: 49cdebad4bc3373f2a5723fd5868e3c35e606d6e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=49cdebad4bc3373f2a5723fd5868e3c35e606d6e
Author: Sebastian Lackner <sebastian at fds-team.de>
Date: Fri Mar 6 07:12:11 2015 +0100
ws2_32: Avoid kernel32 functions in system APC calls.
kernel32 functions might modify the last error, which should be avoided here.
---
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 7e875e7..760e184 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -2079,7 +2079,7 @@ static NTSTATUS WS2_async_accept_recv( void *user, IO_STATUS_BLOCK *iosb,
return status;
if (wsa->user_overlapped->hEvent)
- SetEvent(wsa->user_overlapped->hEvent);
+ NtSetEvent(wsa->user_overlapped->hEvent, NULL);
if (wsa->cvalue)
WS_AddCompletion( HANDLE2SOCKET(wsa->listen_socket), wsa->cvalue, iosb->u.Status, iosb->Information );
@@ -2165,7 +2165,7 @@ finish:
iosb->Information = 0;
if (wsa->user_overlapped->hEvent)
- SetEvent(wsa->user_overlapped->hEvent);
+ NtSetEvent(wsa->user_overlapped->hEvent, NULL);
if (wsa->read) release_async_io( &wsa->read->io );
release_async_io( &wsa->io );
More information about the wine-cvs
mailing list