diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2016-08-15 16:12:35 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2016-08-15 16:12:35 +0000 |
commit | 675fca6b31f2d28d01b005af4fa2efac589cca39 (patch) | |
tree | 5328d9030f821c7a2ef64647f2cca769dd3a72d9 /usr.sbin/httpd/parse.y | |
parent | 1a0a11100b231b0330e6834f276d22fcefeda00d (diff) |
Move server_match() from parse.y to server.c; use env instead of conf,
which is actually the same thing (cluebat from reyk@).
Diffstat (limited to 'usr.sbin/httpd/parse.y')
-rw-r--r-- | usr.sbin/httpd/parse.y | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/usr.sbin/httpd/parse.y b/usr.sbin/httpd/parse.y index f7433f3fa41..6900bc68161 100644 --- a/usr.sbin/httpd/parse.y +++ b/usr.sbin/httpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.79 2016/08/15 13:48:24 jsing Exp $ */ +/* $OpenBSD: parse.y,v 1.80 2016/08/15 16:12:34 jsing Exp $ */ /* * Copyright (c) 2007 - 2015 Reyk Floeter <reyk@openbsd.org> @@ -107,7 +107,6 @@ int host_if(const char *, struct addresslist *, int host(const char *, struct addresslist *, int, struct portrange *, const char *, int); void host_free(struct addresslist *); -struct server *server_match(struct server *, int); struct server *server_inherit(struct server *, struct server_config *, struct server_config *); int getservice(char *); @@ -1992,33 +1991,6 @@ host_free(struct addresslist *al) } struct server * -server_match(struct server *s2, int match_name) -{ - struct server *s1; - - /* Attempt to find matching server. */ - TAILQ_FOREACH(s1, conf->sc_servers, srv_entry) { - if ((s1->srv_conf.flags & SRVFLAG_LOCATION) != 0) - continue; - if (match_name) { - if (strcmp(s1->srv_conf.name, s2->srv_conf.name) != 0) - continue; - } - if (s1->srv_conf.port != s2->srv_conf.port) - continue; - if (sockaddr_cmp( - (struct sockaddr *)&s1->srv_conf.ss, - (struct sockaddr *)&s2->srv_conf.ss, - s1->srv_conf.prefixlen) != 0) - continue; - - return (s1); - } - - return (NULL); -} - -struct server * server_inherit(struct server *src, struct server_config *alias, struct server_config *addr) { |