[PATCH] ws2_32: Automatically sets a socket to non-blocking mode when WSAAsyncSelect or WSAEventSelect is called (try 2).
Alexandre Julliard
julliard at winehq.org
Tue May 21 10:03:00 CDT 2013
Qian Hong <qhong at 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 at winehq.org
More information about the wine-devel
mailing list