зеркало из https://github.com/github/ruby.git
* ext/socket/socket.c (connect_blocking, socks_connect_blocking,
ruby_connect): cast. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
9654ea62cc
Коммит
e4d911fa98
|
@ -1,3 +1,8 @@
|
||||||
|
Tue Jul 22 16:08:58 2008 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
|
* ext/socket/socket.c (connect_blocking, socks_connect_blocking,
|
||||||
|
ruby_connect): cast.
|
||||||
|
|
||||||
Tue Jul 22 11:05:08 2008 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
|
Tue Jul 22 11:05:08 2008 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
|
||||||
|
|
||||||
* test/ruby/test_dir.rb: use realpath of tmpdir. [ruby-dev:35481]
|
* test/ruby/test_dir.rb: use realpath of tmpdir. [ruby-dev:35481]
|
||||||
|
|
|
@ -1146,7 +1146,7 @@ static VALUE
|
||||||
connect_blocking(void *data)
|
connect_blocking(void *data)
|
||||||
{
|
{
|
||||||
struct connect_arg *arg = data;
|
struct connect_arg *arg = data;
|
||||||
return connect(arg->fd, arg->sockaddr, arg->len);
|
return (VALUE)connect(arg->fd, arg->sockaddr, arg->len);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(SOCKS) && !defined(SOCKS5)
|
#if defined(SOCKS) && !defined(SOCKS5)
|
||||||
|
@ -1154,7 +1154,7 @@ static VALUE
|
||||||
socks_connect_blocking(void *data)
|
socks_connect_blocking(void *data)
|
||||||
{
|
{
|
||||||
struct connect_arg *arg = data;
|
struct connect_arg *arg = data;
|
||||||
return Rconnect(arg->fd, arg->sockaddr, arg->len);
|
return (VALUE)Rconnect(arg->fd, arg->sockaddr, arg->len);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1177,7 +1177,7 @@ ruby_connect(int fd, const struct sockaddr *sockaddr, int len, int socks)
|
||||||
if (socks) func = socks_connect_blocking;
|
if (socks) func = socks_connect_blocking;
|
||||||
#endif
|
#endif
|
||||||
for (;;) {
|
for (;;) {
|
||||||
status = BLOCKING_REGION(func, &arg);
|
status = (int)BLOCKING_REGION(func, &arg);
|
||||||
if (status < 0) {
|
if (status < 0) {
|
||||||
switch (errno) {
|
switch (errno) {
|
||||||
case EAGAIN:
|
case EAGAIN:
|
||||||
|
|
Загрузка…
Ссылка в новой задаче