Re: [Boost-bugs] [Boost C++ Libraries] #8752: Bad check for invalid socket in boost::asio::detail::win_iocp_socket_service<Protocol>::accept()

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8752: Bad check for invalid socket in boost::asio::detail::win_iocp_socket_service<Protocol>::accept()
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-08-23 13:05:40


#8752: Bad check for invalid socket in
boost::asio::detail::win_iocp_socket_service<Protocol>::accept()
-------------------------------+----------------------------
  Reporter: Kevin.Vlack@… | Owner: chris_kohlhoff
      Type: Patches | Status: new
 Milestone: To Be Determined | Component: asio
   Version: Boost 1.53.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+----------------------------

Comment (by Kevin.Vlack@…):

 Replying to [comment:1 apolukhin]:
> To fix that error, just replace
> {{{
> if (new_socket.get() >= 0)
> }}}
> with
> {{{
> if (new_socket.get() == SOCKET_ERROR)
> }}}

 Since that line checks if the socket is valid*, I believe that should be:
 {{{
 if (new_socket.get() != SOCKET_ERROR)
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8752#comment:3>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:13 UTC