}
}
+static int setup_listeners(server_rec *s)
+{
+ ap_listen_rec *lr;
+ int sockdes;
+
+ if (ap_listen_open(s->process, s->port)) {
+ ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ALERT, 0, s,
+ "no listening sockets available, shutting down");
+ return -1;
+ }
+
+ listenmaxfd = -1;
+ FD_ZERO(&listenfds);
+ for (lr = ap_listeners; lr; lr = lr->next) {
+ ap_get_os_sock(&sockdes, lr->sd);
+ FD_SET(sockdes, &listenfds);
+ if (sockdes > listenmaxfd) {
+ listenmaxfd = sockdes;
+ }
+ }
+ return 0;
+}
+
/* Useful to erase the status of children that might be from previous
* generations */
static void ap_prefork_force_reset_connection_status(long conn_id)
ap_log_pid(pconf, ap_pid_fname);
- if (ap_setup_listeners(s)) {
+ if (setup_listeners(s)) {
/* XXX: hey, what's the right way for the mpm to indicate a fatal error? */
return 1;
}