Re: [PATCH] ws2_32: Automatically sets a socket to non-blocking mode when WSAAsyncSelect or WSAEventSelect is called (try 2).
Qian Hong <qhong(a)codeweavers.com> writes:
@@ -5383,7 +5383,11 @@ int WINAPI WSAEventSelect(SOCKET s, WSAEVENT hEvent, LONG lEvent) ret = wine_server_call( req ); } SERVER_END_REQ; - if (!ret) return 0; + if (!ret) + { + _enable_event(SOCKET2HANDLE(s), 0, FD_WINE_NONBLOCKING, 0); + return 0; + }
You shouldn't need 2 server calls for this.
@@ -3578,6 +3584,12 @@ static void test_events(int useMessages) goto end; }
+ if (set_blocking(src2, TRUE)) + { + ok(0, "set_blocking failed, error %d\n", WSAGetLastError()); + goto end; + }
There's no reason to abort on every failure. -- Alexandre Julliard julliard(a)winehq.org
On Tue, May 21, 2013 at 11:03 PM, Alexandre Julliard <julliard(a)winehq.org> wrote:
You shouldn't need 2 server calls for this.
There's no reason to abort on every failure.
An improved version is sent, thanks a lot for review! -- Regards, Qian Hong - http://www.codeweavers.com
participants (2)
-
Alexandre Julliard -
Qian Hong