mirror of
https://github.com/boostorg/asio.git
synced 2026-01-27 06:32:08 +00:00
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. [SVN r58650]
This commit is contained in:
@@ -1388,8 +1388,9 @@ inline int gai_echeck(const char* host, const char* service,
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user