|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r58650 - trunk/boost/asio/detail
From: chris_at_[hidden]
Date: 2010-01-02 16:35:33
Author: chris_kohlhoff
Date: 2010-01-02 16:35:33 EST (Sat, 02 Jan 2010)
New Revision: 58650
URL: http://svn.boost.org/trac/boost/changeset/58650
Log:
In getaddrinfo emulation, only check the socket type (SOCK_STREAM or SOCK_DGRAM)
if a service name has been specified. This should allow the emulation to work
with raw sockets.
Text files modified:
trunk/boost/asio/detail/socket_ops.hpp | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
Modified: trunk/boost/asio/detail/socket_ops.hpp
==============================================================================
--- trunk/boost/asio/detail/socket_ops.hpp (original)
+++ trunk/boost/asio/detail/socket_ops.hpp 2010-01-02 16:35:33 EST (Sat, 02 Jan 2010)
@@ -1388,8 +1388,9 @@
break;
case AF_INET:
case AF_INET6:
- if (socktype != 0 && socktype != SOCK_STREAM && socktype != SOCK_DGRAM)
- return EAI_SOCKTYPE;
+ if (service != 0 && service[0] != '\0')
+ if (socktype != 0 && socktype != SOCK_STREAM && socktype != SOCK_DGRAM)
+ return EAI_SOCKTYPE;
break;
default:
return EAI_FAMILY;
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