mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/socket/init.c (rsock_getfamily): return AF_UNSPEC if getsockname
is failed. [ruby-core:24383] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ae487eda6e
commit
c7550e2a3d
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Fri Jul 17 13:35:47 2009 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* ext/socket/init.c (rsock_getfamily): return AF_UNSPEC if getsockname
|
||||
is failed. [ruby-core:24383]
|
||||
|
||||
Fri Jul 17 01:22:57 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* array.c (recursive_join): raise ArgumentError for joining
|
||||
|
|
|
@ -532,7 +532,7 @@ rsock_getfamily(int sockfd)
|
|||
|
||||
ss.ss_family = AF_UNSPEC;
|
||||
if (getsockname(sockfd, (struct sockaddr*)&ss, &sslen) < 0)
|
||||
rb_sys_fail("getsockname(2)");
|
||||
return AF_UNSPEC;
|
||||
|
||||
return ss.ss_family;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue