----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/28716/#review63899 -----------------------------------------------------------
3rdparty/libprocess/include/process/socket.hpp <https://reviews.apache.org/r/28716/#comment106213> do you think it's worth checking the return and returning an Error directly? 3rdparty/libprocess/include/process/socket.hpp <https://reviews.apache.org/r/28716/#comment106212> use stringify() because to_string is not available (i think) in g++-4.4. 3rdparty/libprocess/include/process/socket.hpp <https://reviews.apache.org/r/28716/#comment106214> there's no Error case here so this can be an int return. Alternatively, check the error code and return an ErrnoError. 3rdparty/libprocess/include/process/socket.hpp <https://reviews.apache.org/r/28716/#comment106215> see comment for 'bind' above. 3rdparty/libprocess/include/process/socket.hpp <https://reviews.apache.org/r/28716/#comment106216> stringify 3rdparty/libprocess/src/net.hpp <https://reviews.apache.org/r/28716/#comment106218> if process::bind returns a Try<int> you can check IsError instead and throw with the Error string as a message. 3rdparty/libprocess/src/net.hpp <https://reviews.apache.org/r/28716/#comment106220> you don't need this to be outside the do/while. 3rdparty/libprocess/src/net.hpp <https://reviews.apache.org/r/28716/#comment106219> else on this line, or no else at all given that the 'if' throws. 3rdparty/libprocess/src/net.hpp <https://reviews.apache.org/r/28716/#comment106221> these two conditions can be combined. you can use the error returned in tryAccept in the runtime_error. 3rdparty/libprocess/src/process.cpp <https://reviews.apache.org/r/28716/#comment106222> if connect returns an error this can be made simpler as the Failure will just return the Error as returned by connect. 3rdparty/libprocess/src/process.cpp <https://reviews.apache.org/r/28716/#comment106223> return nodeGetSockName; no need to create a new Error if you know you have a Try<Node> that is an Error :) in fact, this whole block can be replaced by return process::getsockname(get(), AF_INET); 3rdparty/libprocess/src/process.cpp <https://reviews.apache.org/r/28716/#comment106225> why would the return be < 0 if tryAccept is not an error? 3rdparty/libprocess/src/tests/process_tests.cpp <https://reviews.apache.org/r/28716/#comment106226> space before '=' - Dominic Hamon On Dec. 4, 2014, 12:14 p.m., Evelina Dumitrescu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/28716/ > ----------------------------------------------------------- > > (Updated Dec. 4, 2014, 12:14 p.m.) > > > Review request for mesos and Dominic Hamon. > > > Repository: mesos-git > > > Description > ------- > > Created accept, bind, connect and getsockname wrappers in socket.hpp for > different protocol families > > > Diffs > ----- > > 3rdparty/libprocess/include/process/socket.hpp > ab080c154095029c4a01d189a5fd8a178ba6c92e > 3rdparty/libprocess/src/http.cpp b00f33339366f5c06b6f20e38c5ae0c23b8a9358 > 3rdparty/libprocess/src/httpd.cpp 902ba89b18c5d7edf68ca9d17c55e5727529f96e > 3rdparty/libprocess/src/net.hpp 7bf6085e1bd9ffa0e42a5da9c3567521ff4c0713 > 3rdparty/libprocess/src/process.cpp > 4db7d56af710577e08a9d7dbeb92a1f01559401f > 3rdparty/libprocess/src/tests/http_tests.cpp > a90e65f77904da0a45e1cc0cc9889ae69354a1a5 > 3rdparty/libprocess/src/tests/process_tests.cpp > dec62e88ec993433e1a0777593bb2657b43636dc > > Diff: https://reviews.apache.org/r/28716/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Evelina Dumitrescu > >
