mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joseph Wu <jos...@mesosphere.io>
Subject Re: Review Request 62510: Fixed `LibeventSSLSocketImpl` for Windows file descriptors.
Date Wed, 11 Oct 2017 21:55:54 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62510/#review187706
-----------------------------------------------------------


Ship it!




Ship It!

- Joseph Wu


On Oct. 2, 2017, 4:47 p.m., Andrew Schwartzmeyer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62510/
> -----------------------------------------------------------
> 
> (Updated Oct. 2, 2017, 4:47 p.m.)
> 
> 
> Review request for mesos, John Kordich, Joseph Wu, and Till Toenshoff.
> 
> 
> Bugs: MESOS-7992
>     https://issues.apache.org/jira/browse/MESOS-7992
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch introduces the `int_fd` abstraction we use elsewhere to the
> `LibeventSSLSocketImpl` for dealing with Linux versus Windows file
> descriptors. This is necessary because on Windows, the consumer of
> `LibeventSSLSocketImpl::create()` etc. already use `int_fd`.
> 
> Note that this does not break Linux systems, as `int_fd` is defined as
> `int` on all non-Windows systems.
> 
> On Windows, however, in `evbuffer_add_file` we must explicitly convert
> from `int_fd` (holding a Windows file handle) to a CRT `int` file
> descriptor (the platform-specific call to `crt()`).
> 
> We have to correct the type expected by `evconnlistener_new` from `int`
> to `evutil_socket_t`. This previously worked as just an `int` because
> that is the underlying type used for sockets by libevent on Linux, but
> it instead uses `intptr_t` on Windows. The `int_fd` abstraction can be
> casted to `intptr_t` (and thus `evutil_socket_t`) automatically, but not
> `int`, and so correcting the type to `evutil_socket_t` allows us to use
> this lambda for the listener.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/libevent_ssl_socket.hpp 9493a50243340a1c48ab1c67f6e61cc081ef24ce

>   3rdparty/libprocess/src/libevent_ssl_socket.cpp 5767ce04391ee37076d9f97f65084febd0aefbdb

> 
> 
> Diff: https://reviews.apache.org/r/62510/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andrew Schwartzmeyer
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message