summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authorReyk Floeter <reyk@esdenera.com>2015-02-07 02:23:49 +0100
committerReyk Floeter <reyk@esdenera.com>2015-02-07 02:23:49 +0100
commitf45dee2d699f0dceaf4794468cd653b45a9ecdb3 (patch)
treeb538ef4fba281641ff8f3d5db653d8eb53aa8a5f /parse.y
parent2496a64b6cf81b3e41295a1904649e3eb40bd654 (diff)
downloadhttpd-f45dee2d699f0dceaf4794468cd653b45a9ecdb3.tar.gz
httpd-f45dee2d699f0dceaf4794468cd653b45a9ecdb3.zip
sync with -current
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y8
1 files changed, 4 insertions, 4 deletions
diff --git a/parse.y b/parse.y
index 2f8fbcd..daf61c2 100644
--- a/parse.y
+++ b/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.59 2015/01/29 08:52:52 reyk Exp $ */
+/* $OpenBSD: parse.y,v 1.61 2015/02/07 01:23:12 reyk Exp $ */
/*
* Copyright (c) 2007 - 2015 Reyk Floeter <reyk@openbsd.org>
@@ -1850,7 +1850,6 @@ server_inherit(struct server *src, const char *name,
/* Copy the source server and assign a new Id */
memcpy(&dst->srv_conf, &src->srv_conf, sizeof(dst->srv_conf));
-
if ((dst->srv_conf.tls_cert_file =
strdup(src->srv_conf.tls_cert_file)) == NULL)
fatal("out of memory");
@@ -1918,7 +1917,7 @@ server_inherit(struct server *src, const char *name,
/* Copy all the locations of the source server */
TAILQ_FOREACH(s, conf->sc_servers, srv_entry) {
if (!(s->srv_conf.flags & SRVFLAG_LOCATION &&
- s->srv_conf.id == src->srv_conf.id))
+ s->srv_conf.parent_id == src->srv_conf.parent_id))
continue;
if ((dstl = calloc(1, sizeof(*dstl))) == NULL)
@@ -1928,7 +1927,8 @@ server_inherit(struct server *src, const char *name,
strlcpy(dstl->srv_conf.name, name, sizeof(dstl->srv_conf.name));
/* Copy the new Id and listen address */
- dstl->srv_conf.id = dst->srv_conf.id;
+ dstl->srv_conf.id = ++last_server_id;
+ dstl->srv_conf.parent_id = dst->srv_conf.id;
memcpy(&dstl->srv_conf.ss, &addr->ss,
sizeof(dstl->srv_conf.ss));
dstl->srv_conf.port = addr->port;