+Changes with Apache 2.0.35
+
+ *) Don't allow initialization to succeed if we can't get a socket
+ corresponding to one of the Listen statements. [Jeff Trawick]
+
Changes with Apache 2.0.34
*) Allow all Perchild directives to accept either numerical UID/GID
}
-static void alloc_listener(process_rec *process, char *addr, apr_port_t port)
+static const char *alloc_listener(process_rec *process, char *addr, apr_port_t port)
{
ap_listen_rec **walk;
ap_listen_rec *new;
*walk = new->next;
new->next = ap_listeners;
ap_listeners = new;
- return;
+ return NULL;
}
}
}
ap_log_perror(APLOG_MARK, APLOG_CRIT, status, process->pool,
"alloc_listener: failed to set up sockaddr for %s",
addr);
- return;
+ return "Listen setup failed";
}
if ((status = apr_socket_create(&new->sd,
new->bind_addr->family,
!= APR_SUCCESS) {
ap_log_perror(APLOG_MARK, APLOG_CRIT, status, process->pool,
"alloc_listener: failed to get a socket for %s", addr);
- return;
+ return "Listen setup failed";
}
new->next = ap_listeners;
ap_listeners = new;
+ return NULL;
}
static int ap_listen_open(apr_pool_t *pool, apr_port_t port)
return "Port must be specified";
}
- alloc_listener(cmd->server->process, host, port);
-
- return NULL;
+ return alloc_listener(cmd->server->process, host, port);
}
const char *ap_set_listenbacklog(cmd_parms *cmd, void *dummy, const char *arg)