}
static GList *
-systemd_get_socket (gint number, gint listen_type)
+systemd_get_socket (gint number)
{
int sock, max, flags;
GList *result = NULL;
errno = EINVAL;
return NULL;
}
- if (listen_type != SOCK_DGRAM) {
- if (listen (sock, -1) == -1) {
- return NULL;
- }
- }
flags = fcntl (sock, F_GETFD);
if (flags != -1) {
(void)fcntl (sock, F_SETFD, flags | FD_CLOEXEC);
cf->worker->listen_type);
}
else {
- ls = systemd_get_socket (bcf->ai, cf->worker->listen_type);
+ ls = systemd_get_socket (bcf->ai);
}
if (ls == NULL) {
msg_err ("cannot listen on socket %s: %s", bcf->bind_host, strerror (errno));