- struct irc_sockaddr_storage sai;
- socklen_t addrlen = sizeof(sai);
- int fd;
- listener_t *listener = data;
- struct ConfItem *aconf;
- char buf[BUFSIZE];
-
- s_assert(listener != NULL);
- if(listener == NULL)
- return;
- /*
- * There may be many reasons for error return, but
- * in otherwise correctly working environment the
- * probable cause is running out of file descriptors
- * (EMFILE, ENFILE or others?). The man pages for
- * accept don't seem to list these as possible,
- * although it's obvious that it may happen here.
- * Thus no specific errors are tested at this
- * point, just assume that connections cannot
- * be accepted until some old is closed first.
- */
-
- fd = comm_accept(listener->fd, (struct sockaddr *)&sai, &addrlen);
- if(fd < 0)