1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/socket/socket.c (addrinfo_getnameinfo): use NI_DGRAM if socktype

is SOCK_DGRAM.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2009-01-07 15:27:09 +00:00
parent 0f94c670f7
commit 3802c43ea1
2 changed files with 8 additions and 0 deletions

View file

@ -1,3 +1,8 @@
Thu Jan 8 00:26:35 2009 Tanaka Akira <akr@fsij.org>
* ext/socket/socket.c (addrinfo_getnameinfo): use NI_DGRAM if socktype
is SOCK_DGRAM.
Thu Jan 8 00:16:22 2009 Tanaka Akira <akr@fsij.org>
* ext/socket/socket.c (host_str): add flags_ptr argument to specify

View file

@ -4491,6 +4491,9 @@ addrinfo_getnameinfo(int argc, VALUE *argv, VALUE self)
flags = NIL_P(vflags) ? 0 : NUM2INT(vflags);
if (rai->socktype == SOCK_DGRAM)
flags |= NI_DGRAM;
error = getnameinfo((struct sockaddr *)&rai->addr, rai->sockaddr_len,
hbuf, sizeof(hbuf), pbuf, sizeof(pbuf),
flags);