Commit Graph

166 Commits (master)

Author SHA1 Message Date
Damjan Jovanovic 37dec9f144 server: Revert b4a1d80ae3 for now.
It breaks too many things.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48357
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-06 22:19:19 +01:00
Damjan Jovanovic b4a1d80ae3 wineserver: Avoid spurious FD_WRITE on repeated calls to WSAEventSelect().
Repeated calls to WSAEventSelect() with FD_WRITE deliver
spurious FD_WRITE events, as the flag isn't held, resulting
in us unnecessarily polling the socket for writability,
despite the fact FD_WRITE should only be delivered (1) initially
on socket creation, and (2) after send[to]() fails with
EWOULDBLOCK and buffer space becomes available.

Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-20 10:33:54 +01:00
Jacek Caban b2a546c92d server: Introduce kernel_object struct for generic association between server and kernel objects.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-26 13:55:15 +01:00
Alexandre Julliard 70073ff2d0 server: Return a WSA error code in accept_socket.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-20 16:26:04 +01:00
Alexandre Julliard 49babc0bad server: Return a WSA error code in WS_SIO_ADDRESS_LIST_CHANGE.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-20 16:26:04 +01:00
Alexandre Julliard 424a379f64 server: Return a WSA error code in create_socket.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-20 16:26:04 +01:00
Alexandre Julliard f670a162a0 server: Return WSA error codes in socket events.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-20 16:26:04 +01:00
Jacek Caban 04094a6669 server: Use server_get_file_info for all info classes not implemented on client side.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-24 16:58:08 +02:00
Jacek Caban 6b08e60f03 server: Introduce get_file_info request for server-side NtQueryInformationFile implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-22 12:19:43 +01:00
Jacek Caban 2ab2f31f18 server: Allow server side NtQueryVolumeInformationFile implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-03 09:39:52 +02:00
Jacek Caban 0b4c8bf93f server: Make async_queue object a simple list instead of a server object.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-05 10:39:54 +02:00
Jacek Caban 37804f1ec5 server: Keep ifchange queue through sock object life time.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-03 15:57:46 +02:00
Jacek Caban c56c42ff79 server: Use create_request_async in ioctl request handler.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-28 12:32:49 +02:00
Jacek Caban 047062b28b server: Remove no longer needed blocking argument from ioctl fd op.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-12 19:11:24 +02:00
Jacek Caban 5c8d11270d server: Introduce async_is_blocking helper and use it in sock_ioctl.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-12 19:11:20 +02:00
Jacek Caban bede6499ed server: Create async object in ioctl request handler.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-21 14:24:11 +01:00
Jacek Caban a604db1261 server: Create async object in register_async handler.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-21 14:22:48 +01:00
Jacek Caban 91bd81441f server: Allow creating async object not associated with a queue.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-21 14:22:44 +01:00
Jacek Caban 64dc8f5c48 server: Store iosb in async object.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-05 16:11:03 +01:00
Jacek Caban ad1e0609a0 server: Get rid of no loner used cancel_async from fd_ops.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-01 13:50:59 +01:00
Jacek Caban 055918c982 server: Store async list in process object and use that to find async in cansel_async request.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-01 13:50:27 +01:00
Jacek Caban 60f8ddbf9d server: Create ifchange async queue on socket fd.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-13 18:22:00 +02:00
Jacek Caban 93863d25fc ws2_32: Pass completion routing to NtDeviceIoControlFile in server_ioctl_sock only if caller provided completion routine.
Otherwise we're always doing non-blocking calls, preventing server from
doing the right thing (and in actually doing the opposite in
WS_SIO_ADDRESS_LIST_CHANGE case).

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-13 18:21:11 +02:00
Alexandre Julliard 438dae524d server: Avoid some compiler warnings when EWOULDBLOCK == EAGAIN.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-30 19:09:20 +09:00
Alexandre Julliard f55db7882d server: Add link_name and unlink_name object operations.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-04 21:07:19 +09:00
Erich E. Hoover dfa73ca626 server: Return STATUS_CANT_WAIT/WSAEWOULDBLOCK for non-overlapped SIO_ADDRESS_LIST_CHANGE requests on non-blocking sockets.
Signed-off-by: Erich E. Hoover <erich.e.hoover@wine-staging.com>
2015-10-02 18:11:32 +09:00
Alexandre Julliard ad53ffc9c0 server: Make async objects waitable. 2015-05-08 17:32:06 +09:00
Alexandre Julliard 83e3a9c9ba server: Allow cancelling async I/O for all object types. 2015-05-06 17:16:16 +09:00
Alexandre Julliard 837b39b202 server: Add read and write fd member functions.
Also rename no_flush() to no_fd_flush() for consistency.
2015-05-06 09:07:42 +09:00
Alexandre Julliard 6f2ed23c16 server: Retrieve ioctl data directly from the request. 2015-05-06 08:44:29 +09:00
Alexandre Julliard 5db44d15ac server: Copy completion information for accepted socket into the new file descriptor. 2015-03-17 00:19:55 +09:00
Erich E. Hoover 67c47e401b server: Implement the interface change notification object. 2015-02-10 22:57:36 +09:00
Erich E. Hoover b121f27b72 server: Add blocked support for SIO_ADDRESS_LIST_CHANGE ioctl(). 2015-02-10 22:45:02 +09:00
Erich E. Hoover 315de61bb2 server: Add socket-side support for the interface change notification object. 2015-02-10 22:45:00 +09:00
Erich E. Hoover 1239663fcb server: Implement socket-specific ioctl() routine. 2015-02-10 22:29:40 +09:00
Bruno Jesus 3591e5fd9f server: Store the time of the socket connection.
Based on a patch by Erich Hoover.
2014-11-12 20:07:55 +09:00
Bruno Jesus 8821967bd6 server: Add a missing socket protocol attribution.
The new socket has to inherit the information just like family and type.
2014-11-12 20:07:55 +09:00
Felix Janda e3faab267c server: Add missing includes of poll.h. 2014-06-12 18:05:08 +02:00
Sebastian Lackner 0b261bef76 server: Don't call close() on uninitialized memory in sock_check_pollhup. 2014-01-01 20:45:32 +01:00
Bruno Jesus c52eb21754 server: Fix a comment. 2013-09-23 11:50:56 +02:00
Dmitry Timoshkov e22f8d2fd8 server: Print the debug trace to stderr. 2013-09-04 11:32:53 +02:00
Bruno Jesus ec49a574de server: Add a request to get socket information. 2013-09-02 19:51:16 +02:00
Bruno Jesus f5023dda2d server: Store the protocol while creating the socket. 2013-09-02 19:48:08 +02:00
Alexandre Julliard 39644bb309 server: Pass a wait queue entry to the signaled/satisfied object functions. 2013-08-27 23:48:36 +02:00
Qian Hong 31b9455b7e server: Automatically sets a socket to non-blocking mode when WSAAsyncSelect or WSAEventSelect is called even when lEvent is zero. 2013-05-28 19:43:48 +02:00
Alexandre Julliard 9fdf7bc771 server: Use socklen_t where appropriate. 2013-03-06 13:40:58 +01:00
Marcus Meissner 3199fe147d server: Removed duplicate close of acceptfd (Coverity). 2012-10-10 10:35:38 +02:00
Francois Gouget c7cb3e6cb2 configure: Use errno.h instead of the non-standard sys/errno.h header. 2011-12-15 17:46:38 +01:00
Marcus Meissner 27c9a61e15 server: Remove superflous NULL check (Coverity). 2011-06-14 15:27:13 +02:00
Mike Kaplinskiy f58c709b5f server: Fix connect failures on newer kernels. 2011-01-24 14:43:28 +01:00