mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/socket/ancdata.c (bsock_recvmsg_internal): check recvmsg error
earlier. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
90fc8d84ad
commit
d227ca29f4
2 changed files with 8 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
Sun Feb 22 00:31:42 2009 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* ext/socket/ancdata.c (bsock_recvmsg_internal): check recvmsg error
|
||||
earlier.
|
||||
|
||||
Fri Feb 20 23:28:11 2009 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* util.c (rv_alloc, freedtoa): use our normal xmalloc()/xfree() because
|
||||
|
|
|
@ -1290,6 +1290,9 @@ bsock_recvmsg_internal(int argc, VALUE *argv, VALUE sock, int nonblock)
|
|||
goto retry;
|
||||
}
|
||||
|
||||
if (ss == -1)
|
||||
rb_sys_fail("recvmsg(2)");
|
||||
|
||||
if (grow_buffer) {
|
||||
int grown = 0;
|
||||
#if defined(HAVE_ST_MSG_CONTROL)
|
||||
|
@ -1321,9 +1324,6 @@ bsock_recvmsg_internal(int argc, VALUE *argv, VALUE sock, int nonblock)
|
|||
}
|
||||
}
|
||||
|
||||
if (ss == -1)
|
||||
rb_sys_fail("recvmsg(2)");
|
||||
|
||||
if (NIL_P(dat_str))
|
||||
dat_str = rb_tainted_str_new(datbuf, ss);
|
||||
else {
|
||||
|
|
Loading…
Reference in a new issue