MINOR: sock: rename sock_accept_conn() to sock_accepting_conn()
This call was introduced by commit 5ced3e887 ("MINOR: sock: add
sock_accept_conn() to test a listening socket") but is actually quite
confusing because it makes one think the socket will accept a connection
(which is what we want to have in a new function) while it only tells
whether it's configured to accept connections. Let's call it
sock_accepting_conn() instead.
The same change was applied to sockpair which had the same issue.
diff --git a/src/proto_uxst.c b/src/proto_uxst.c
index 5cf16a7..be8525b 100644
--- a/src/proto_uxst.c
+++ b/src/proto_uxst.c
@@ -65,7 +65,7 @@
.rx_disable = sock_disable,
.rx_unbind = sock_unbind,
.rx_suspend = uxst_suspend_receiver,
- .rx_listening = sock_accept_conn,
+ .rx_listening = sock_accepting_conn,
.accept = &listener_accept,
.connect = &uxst_connect_server,
.receivers = LIST_HEAD_INIT(proto_unix.receivers),
@@ -111,7 +111,7 @@
}
fd = listener->rx.fd;
- ready = sock_accept_conn(&listener->rx) > 0;
+ ready = sock_accepting_conn(&listener->rx) > 0;
if (!ready && /* only listen if not already done by external process */
listen(fd, listener_backlog(listener)) < 0) {