зеркало из https://github.com/github/ruby.git
* 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:
Родитель
0f94c670f7
Коммит
3802c43ea1
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче