summaryrefslogtreecommitdiff
path: root/ext/socket/socket.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-06 11:21:05 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-06 11:21:05 +0000
commitd818a6ab40bca1fc874a06cb851ca1f2fa371331 (patch)
treeac00f5fb38b4af1f530f158f6d3cf23186aaace2 /ext/socket/socket.c
parent67fe038d8f27a71b81a71048abd4174ded45a551 (diff)
* ext/socket/socket.c (rsock_sys_fail_raddrinfo): Renamed from
rsock_sys_fail_addrinfo. (rsock_sys_fail_raddrinfo_or_sockaddr): Renamed from rsock_sys_fail_addrinfo_or_sockaddr. * ext/socket/rubysocket.h: Follow the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/socket.c')
-rw-r--r--ext/socket/socket.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index bb8bdac..9b96254 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -53,11 +53,11 @@ rsock_sys_fail_sockaddr(const char *mesg, struct sockaddr *addr, socklen_t len)
rai = rsock_addrinfo_new(addr, len, PF_UNSPEC, 0, 0, Qnil, Qnil);
- rsock_sys_fail_addrinfo(mesg, rai);
+ rsock_sys_fail_raddrinfo(mesg, rai);
}
void
-rsock_sys_fail_addrinfo(const char *mesg, VALUE rai)
+rsock_sys_fail_raddrinfo(const char *mesg, VALUE rai)
{
VALUE str, message;
@@ -68,7 +68,7 @@ rsock_sys_fail_addrinfo(const char *mesg, VALUE rai)
}
void
-rsock_sys_fail_addrinfo_or_sockaddr(const char *mesg, VALUE addr, VALUE rai)
+rsock_sys_fail_raddrinfo_or_sockaddr(const char *mesg, VALUE addr, VALUE rai)
{
if (NIL_P(rai)) {
StringValue(addr);
@@ -77,7 +77,7 @@ rsock_sys_fail_addrinfo_or_sockaddr(const char *mesg, VALUE addr, VALUE rai)
(socklen_t)RSTRING_LEN(addr)); /* overflow should be checked already */
}
else
- rsock_sys_fail_addrinfo(mesg, rai);
+ rsock_sys_fail_raddrinfo(mesg, rai);
}
static void
@@ -384,7 +384,7 @@ sock_connect(VALUE sock, VALUE addr)
fd = fptr->fd;
n = rsock_connect(fd, (struct sockaddr*)RSTRING_PTR(addr), RSTRING_SOCKLEN(addr), 0);
if (n < 0) {
- rsock_sys_fail_addrinfo_or_sockaddr("connect(2)", addr, rai);
+ rsock_sys_fail_raddrinfo_or_sockaddr("connect(2)", addr, rai);
}
return INT2FIX(n);
@@ -447,7 +447,7 @@ sock_connect_nonblock(VALUE sock, VALUE addr)
if (n < 0) {
if (errno == EINPROGRESS)
rb_mod_sys_fail(rb_mWaitWritable, "connect(2) would block");
- rsock_sys_fail_addrinfo_or_sockaddr("connect(2)", addr, rai);
+ rsock_sys_fail_raddrinfo_or_sockaddr("connect(2)", addr, rai);
}
return INT2FIX(n);
@@ -548,7 +548,7 @@ sock_bind(VALUE sock, VALUE addr)
SockAddrStringValueWithAddrinfo(addr, rai);
GetOpenFile(sock, fptr);
if (bind(fptr->fd, (struct sockaddr*)RSTRING_PTR(addr), RSTRING_SOCKLEN(addr)) < 0)
- rsock_sys_fail_addrinfo_or_sockaddr("bind(2)", addr, rai);
+ rsock_sys_fail_raddrinfo_or_sockaddr("bind(2)", addr, rai);
return INT2FIX(0);
}