Update of /cvsroot/boost/boost/libs/asio/test/ip
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13826/ip
Modified Files:
unicast.cpp
Log Message:
Fix IPv6 detection.
Index: unicast.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/asio/test/ip/unicast.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- unicast.cpp 6 Jan 2007 10:26:16 -0000 1.1
+++ unicast.cpp 23 Feb 2007 01:34:33 -0000 1.2
@@ -69,17 +69,17 @@
io_service ios;
boost::system::error_code ec;
- ip::udp::endpoint ep_v4(ip::address_v4::any(), 0);
+ ip::udp::endpoint ep_v4(ip::address_v4::loopback(), 0);
ip::udp::socket sock_v4(ios);
sock_v4.open(ep_v4.protocol(), ec);
+ sock_v4.bind(ep_v4, ec);
bool have_v4 = !ec;
- sock_v4.bind(ep_v4);
- ip::udp::endpoint ep_v6(ip::address_v6::any(), 0);
+ ip::udp::endpoint ep_v6(ip::address_v6::loopback(), 0);
ip::udp::socket sock_v6(ios);
sock_v6.open(ep_v6.protocol(), ec);
+ sock_v6.bind(ep_v6, ec);
bool have_v6 = !ec;
- sock_v6.bind(ep_v6);
BOOST_CHECK(have_v4 || have_v6);
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs