diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-03-06 16:35:53 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-03-06 16:35:53 -0800 |
commit | 59b9b5d4f8499b45deaec7cc89ca7d3a54a9c215 (patch) | |
tree | f4fa26ec57176c6756aecddb716e7405f50b8f58 | |
parent | bfb85ee47ae477920a830386e4804a341c7e260b (diff) | |
download | txr-59b9b5d4f8499b45deaec7cc89ca7d3a54a9c215.tar.gz txr-59b9b5d4f8499b45deaec7cc89ca7d3a54a9c215.tar.bz2 txr-59b9b5d4f8499b45deaec7cc89ca7d3a54a9c215.zip |
Refer to correct socket function names in errors.
* socket.c (sock_bind, sock_connect, sock_listen): Report
function name as sock-bind, sock-connect and sock-listen,
rather than bind, connect and listen.
-rw-r--r-- | socket.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -248,7 +248,7 @@ static val sock_bind(val sock, val sockaddr) sockaddr_in(sockaddr, family, &sa, &salen); if (bind(sfd, coerce(struct sockaddr *, &sa), salen) != 0) - uw_throwf(socket_error_s, lit("bind failed: ~d/~s"), + uw_throwf(socket_error_s, lit("sock-bind failed: ~d/~s"), num(errno), string_utf8(strerror(errno)), nao); return t; @@ -264,7 +264,7 @@ static val sock_connect(val sock, val sockaddr) sockaddr_in(sockaddr, family, &sa, &salen); if (connect(c_num(sfd), coerce(struct sockaddr *, &sa), salen) != 0) - uw_throwf(socket_error_s, lit("connect failed: ~d/~s"), + uw_throwf(socket_error_s, lit("sock-connect failed: ~d/~s"), num(errno), string_utf8(strerror(errno)), nao); sock_set_peer(sock, sockaddr); @@ -277,7 +277,7 @@ static val sock_listen(val sock, val backlog) val sfd = stream_fd(sock); if (listen(c_num(sfd), c_num(default_arg(backlog, num_fast(16))))) - uw_throwf(socket_error_s, lit("listen failed: ~d/~s"), + uw_throwf(socket_error_s, lit("sock-listen failed: ~d/~s"), num(errno), string_utf8(strerror(errno)), nao); return t; |