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

* ext/socket/ancdata.c (bsock_recvmsg_internal): fix exception.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2009-02-19 13:18:02 +00:00
parent bed4294451
commit 98f82fc633
2 changed files with 5 additions and 1 deletions

View file

@ -1,3 +1,7 @@
Thu Feb 19 22:17:38 2009 Tanaka Akira <akr@fsij.org>
* ext/socket/ancdata.c (bsock_recvmsg_internal): fix exception.
Thu Feb 19 21:13:03 2009 Tanaka Akira <akr@fsij.org>
* ext/socket/ancdata.c (ancillary_unix_rights): method renamed.

View file

@ -1347,7 +1347,7 @@ bsock_recvmsg_internal(int argc, VALUE *argv, VALUE sock, int nonblock)
VALUE ctl;
size_t clen;
if (cmh->cmsg_len == 0) {
rb_raise(rb_eIOError, "invalid control message (cmsg_len == 0)");
rb_raise(rb_eTypeError, "invalid control message (cmsg_len == 0)");
}
clen = (char*)cmh + cmh->cmsg_len - (char*)CMSG_DATA(cmh);
ctl = ancdata_new(family, cmh->cmsg_level, cmh->cmsg_type, rb_tainted_str_new((char*)CMSG_DATA(cmh), clen));