|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r58651 - trunk/boost/asio/detail
From: chris_at_[hidden]
Date: 2010-01-02 16:37:11
Author: chris_kohlhoff
Date: 2010-01-02 16:37:10 EST (Sat, 02 Jan 2010)
New Revision: 58651
URL: http://svn.boost.org/trac/boost/changeset/58651
Log:
Add a workaround for some broken Windows firewalls that make a socket
appear bound to 0.0.0.0 when it is in fact bound to 127.0.0.1.
Text files modified:
trunk/boost/asio/detail/socket_select_interrupter.hpp | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
Modified: trunk/boost/asio/detail/socket_select_interrupter.hpp
==============================================================================
--- trunk/boost/asio/detail/socket_select_interrupter.hpp (original)
+++ trunk/boost/asio/detail/socket_select_interrupter.hpp 2010-01-02 16:37:10 EST (Sat, 02 Jan 2010)
@@ -72,6 +72,11 @@
boost::throw_exception(e);
}
+ // Some broken firewalls on Windows will intermittently cause getsockname to
+ // return 0.0.0.0 when the socket is actually bound to 127.0.0.1. We
+ // explicitly specify the target address here to work around this problem.
+ addr.sin_addr.s_addr = inet_addr("127.0.0.1");
+
if (socket_ops::listen(acceptor.get(),
SOMAXCONN, ec) == socket_error_retval)
{
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk