|
Boost Users : |
From: Scott Finley (sfinley_at_[hidden])
Date: 2007-05-10 08:35:10
I have found what appears to be a bug in ASIO. From
boost/asio/detail/socket_select_interrupter.hpp, starting on line 53:
sockaddr_in4_type addr;
socket_addr_len_type addr_len = sizeof(addr);
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = inet_addr("127.0.0.1");
addr.sin_port = 0;
if (socket_ops::bind(acceptor.get(), (const socket_addr_type*)&addr,
addr_len, ec) == socket_error_retval)
{
boost::system::system_error e(ec, "socket_select_interrupter");
boost::throw_exception(e);
}
addr needs to be cleared before it is used. The failure to do this
caused the bind call to fail for me on VxWorks 6.4.
I inserted the following line right after the delcaration of addr:
bzero((char *)&addr, sizeof(sockaddr_in4_type));
This solved the problem for me.
-- /************************************** * Scott Finley * Research Software Engineer * TomoTherapy Inc. * Email: sfinley_at_[hidden] * Phone: 608.824.3381 ***/
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net