PATCH: handle wildcard socket types and protocols in getaddrinfo()
Marcus Meissner
marcus at jet.franken.de
Wed Jan 4 05:55:42 CST 2006
Hi,
This handles socket type and protocols of 0, reported by SecureCRT calling
getaddrinfo() (getaddrinfo specific wildcard).
Ciao, Marcus
Changelog:
Map wildcards for sockettype and protocol in getaddrinfo().
Index: dlls/winsock/socket.c
===================================================================
RCS file: /home/wine/wine/dlls/winsock/socket.c,v
retrieving revision 1.205
diff -u -r1.205 socket.c
--- dlls/winsock/socket.c 3 Jan 2006 12:41:41 -0000 1.205
+++ dlls/winsock/socket.c 4 Jan 2006 11:54:25 -0000
@@ -3161,8 +3172,14 @@
memset(&unixhints, 0, sizeof(unixhints));
punixhints->ai_flags = convert_aiflag_w2u(hints->ai_flags);
punixhints->ai_family = convert_af_w2u(hints->ai_family);
- punixhints->ai_socktype = convert_socktype_w2u(hints->ai_socktype);
- punixhints->ai_protocol = convert_proto_w2u(hints->ai_protocol);
+ if (hints->ai_socktype == 0) /* wildcard, specific to getaddrinfo() */
+ punixhints->ai_socktype = 0;
+ else
+ punixhints->ai_socktype = convert_socktype_w2u(hints->ai_socktype);
+ if (hints->ai_protocol == 0) /* wildcard, specific to getaddrinfo() */
+ punixhints->ai_protocol = 0;
+ else
+ punixhints->ai_protocol = convert_proto_w2u(hints->ai_protocol);
}
/* getaddrinfo(3) is thread safe, no need to wrap in CS */
More information about the wine-patches
mailing list