summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 635debd)
raw | patch | inline | side by side (parent: 635debd)
author | Sebastian Harl <sh@tokkee.org> | |
Fri, 25 Oct 2013 16:59:40 +0000 (18:59 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Fri, 25 Oct 2013 16:59:40 +0000 (18:59 +0200) |
src/frontend/sock.c | patch | blob | history |
diff --git a/src/frontend/sock.c b/src/frontend/sock.c
index a389a142b94f8a1a609a02a2ae1773239dc0e624..667b616d49105214d5a9ad7f814d2ce43b387bfb 100644 (file)
--- a/src/frontend/sock.c
+++ b/src/frontend/sock.c
} /* connection_handler */
static int
-accept_connection(sdb_fe_socket_t *sock, listener_t *listener)
+connection_accept(sdb_fe_socket_t *sock, listener_t *listener)
{
sdb_object_t *obj;
- /* the X's will be replaced with the accepted file descriptor
- * when initializing the object */
+ /* the placeholder will be replaced with the accepted file
+ * descriptor when initializing the object */
obj = sdb_object_create(CONN_FD_PREFIX CONN_FD_PLACEHOLDER,
connection_type, listener->sock_fd);
if (! obj)
/* hand ownership over to the list */
sdb_object_deref(obj);
return 0;
-} /* accept_connection */
+} /* connection_accept */
/*
* public API
for (i = 0; i < sock->listeners_num; ++i) {
listener_t *listener = sock->listeners + i;
if (FD_ISSET(listener->sock_fd, &ready))
- if (accept_connection(sock, listener))
+ if (connection_accept(sock, listener))
continue;
}