aboutsummaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2023-06-09 16:54:04 +0000
committerOmar Polo <op@omarpolo.com>2023-06-09 16:54:04 +0000
commite45334e6ae0b658a2d3d4f47bc3e9ddfdb83a44f (patch)
tree881c5869011704d8a29ec856de11d1d5b593c8b4 /parse.y
parentd273c0648d7bb1245d43d8d34ff75b62270155e2 (diff)
move hosts into the config struct
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse.y b/parse.y
index fb88fca..d4ac93a 100644
--- a/parse.y
+++ b/parse.y
@@ -237,7 +237,7 @@ option : CHROOT string {
vhost : SERVER string {
host = new_vhost();
- TAILQ_INSERT_HEAD(&hosts, host, vhosts);
+ TAILQ_INSERT_HEAD(&conf.hosts, host, vhosts);
loc = new_location();
TAILQ_INSERT_HEAD(&host->locations, loc, locations);
@@ -953,7 +953,7 @@ print_conf(void)
if (*conf.user != '\0')
printf("user \"%s\"\n", conf.user);
- TAILQ_FOREACH(h, &hosts, vhosts) {
+ TAILQ_FOREACH(h, &conf.hosts, vhosts) {
printf("\nserver \"%s\" {\n", h->domain);
printf(" cert \"%s\"\n", h->cert);
printf(" key \"%s\"\n", h->key);