diff options
Diffstat (limited to 'usr.sbin/httpd/server.c')
-rw-r--r-- | usr.sbin/httpd/server.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/usr.sbin/httpd/server.c b/usr.sbin/httpd/server.c index cff35e0607b..2b230111cd7 100644 --- a/usr.sbin/httpd/server.c +++ b/usr.sbin/httpd/server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server.c,v 1.15 2014/07/29 16:38:34 reyk Exp $ */ +/* $OpenBSD: server.c,v 1.16 2014/07/30 10:05:14 reyk Exp $ */ /* * Copyright (c) 2006 - 2014 Reyk Floeter <reyk@openbsd.org> @@ -96,6 +96,9 @@ server_shutdown(void) int server_privinit(struct server *srv) { + if (srv->srv_conf.flags & SRVFLAG_LOCATION) + return (0); + log_debug("%s: adding server %s", __func__, srv->srv_conf.name); if ((srv->srv_s = server_socket_listen(&srv->srv_conf.ss, @@ -196,6 +199,19 @@ server_byaddr(struct sockaddr *addr, in_port_t port) return (NULL); } +struct server * +server_byname(const char *name) +{ + struct server *srv; + + TAILQ_FOREACH(srv, env->sc_servers, srv_entry) { + if (strcmp(srv->srv_conf.name, name) == 0) + return (srv); + } + + return (NULL); +} + int server_socket_af(struct sockaddr_storage *ss, in_port_t port) { |