mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-03 01:51:48 +00:00
server: Use check_fd_events() instead of calling poll() directly.
This commit is contained in:
parent
78f1dd8967
commit
13fb500cbb
|
@ -3468,11 +3468,7 @@ DECL_HANDLER(recv_socket)
|
|||
* asyncs will not consume all available data; if there's no data
|
||||
* available, the current request won't be immediately satiable.
|
||||
*/
|
||||
struct pollfd pollfd;
|
||||
pollfd.fd = get_unix_fd( sock->fd );
|
||||
pollfd.events = req->oob && !is_oobinline( sock ) ? POLLPRI : POLLIN;
|
||||
pollfd.revents = 0;
|
||||
if (poll(&pollfd, 1, 0) >= 0 && pollfd.revents)
|
||||
if (check_fd_events( sock->fd, req->oob && !is_oobinline( sock ) ? POLLPRI : POLLIN ))
|
||||
{
|
||||
/* Give the client opportunity to complete synchronously.
|
||||
* If it turns out that the I/O request is not actually immediately satiable,
|
||||
|
@ -3568,11 +3564,7 @@ DECL_HANDLER(send_socket)
|
|||
* asyncs will not consume all available space; if there's no space
|
||||
* available, the current request won't be immediately satiable.
|
||||
*/
|
||||
struct pollfd pollfd;
|
||||
pollfd.fd = get_unix_fd( sock->fd );
|
||||
pollfd.events = POLLOUT;
|
||||
pollfd.revents = 0;
|
||||
if (poll(&pollfd, 1, 0) >= 0 && pollfd.revents)
|
||||
if (check_fd_events( sock->fd, POLLOUT ))
|
||||
{
|
||||
/* Give the client opportunity to complete synchronously.
|
||||
* If it turns out that the I/O request is not actually immediately satiable,
|
||||
|
|
Loading…
Reference in a new issue