src: improve code comments

This commit is contained in:
Bert Belder 2020-05-26 18:27:08 +02:00
parent 07af653b17
commit f8a135487d
No known key found for this signature in database
GPG Key ID: 7A77887B2E2ED461
2 changed files with 5 additions and 5 deletions

View File

@ -146,7 +146,7 @@ int sock_set_event(port_state_t* port_state,
const struct epoll_event* ev) {
/* EPOLLERR and EPOLLHUP are always reported, even when not requested by the
* caller. However they are disabled after a event has been reported for a
* socket for which the EPOLLONESHOT flag as set. */
* socket for which the EPOLLONESHOT flag was set. */
uint32_t events = ev->events | EPOLLERR | EPOLLHUP;
sock_state->user_events = events;

View File

@ -60,10 +60,10 @@ SOCKET ws_get_base_socket(SOCKET socket) {
* never intercept the `SIO_BASE_HANDLE` ioctl [1], Komodia based LSPs do
* so anyway, breaking it, with the apparent intention of preventing LSP
* bypass [2]. Fortunately they don't handle `SIO_BSP_HANDLE_POLL`, which
* we can use to obtain the socket associated with the next protocol chain
* entry. If this succeeds, loop around and call `SIO_BASE_HANDLE` again
* with the retrieved BSP socket to be sure that we actually got all the
* way to the base.
* will at least let us obtain the socket associated with the next winsock
* protocol chain entry. If this succeeds, loop around and call
* `SIO_BASE_HANDLE` again with the returned BSP socket, to make sure that
* we unwrap all layers and retrieve the actual base socket.
* [1] https://docs.microsoft.com/en-us/windows/win32/winsock/winsock-ioctls
* [2] https://www.komodia.com/newwiki/index.php?title=Komodia%27s_Redirector_bug_fixes#Version_2.2.2.6
*/