diff options
Diffstat (limited to 'ext/socket/udpsocket.c')
-rw-r--r-- | ext/socket/udpsocket.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/socket/udpsocket.c b/ext/socket/udpsocket.c index 0ba4371f1a..4ea9db6583 100644 --- a/ext/socket/udpsocket.c +++ b/ext/socket/udpsocket.c @@ -93,7 +93,7 @@ udp_connect(VALUE sock, VALUE host, VALUE port) arg.fd = fptr->fd; ret = rb_ensure(udp_connect_internal, (VALUE)&arg, rsock_freeaddrinfo, (VALUE)arg.res); - if (!ret) rb_sys_fail("connect(2)"); + if (!ret) rsock_sys_fail_host_port("connect(2)", host, port); return INT2FIX(0); } @@ -126,7 +126,9 @@ udp_bind(VALUE sock, VALUE host, VALUE port) return INT2FIX(0); } freeaddrinfo(res0); - rb_sys_fail("bind(2)"); + + rsock_sys_fail_host_port("bind(2)", host, port); + return INT2FIX(0); } @@ -187,7 +189,7 @@ udp_send(int argc, VALUE *argv, VALUE sock) } } freeaddrinfo(res0); - rb_sys_fail("sendto(2)"); + rsock_sys_fail_host_port("sendto(2)", host, port); return INT2FIX(n); } |