aboutsummaryrefslogtreecommitdiff
path: root/server.c
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 /server.c
parentd273c0648d7bb1245d43d8d34ff75b62270155e2 (diff)
move hosts into the config struct
Diffstat (limited to 'server.c')
-rw-r--r--server.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/server.c b/server.c
index 80f8d25..dd7dcc8 100644
--- a/server.c
+++ b/server.c
@@ -433,7 +433,7 @@ handle_handshake(int fd, short ev, void *d)
goto err;
}
- TAILQ_FOREACH(h, &hosts, vhosts) {
+ TAILQ_FOREACH(h, &conf.hosts, vhosts) {
if (matches(h->domain, c->domain))
goto found;
TAILQ_FOREACH(a, &h->aliases, aliases) {
@@ -1390,7 +1390,7 @@ setup_tls(void)
fatalx("tls_config_set_protocols: %s",
tls_config_error(tlsconf));
- h = TAILQ_FIRST(&hosts);
+ h = TAILQ_FIRST(&conf.hosts);
/* we need to set something, then we can add how many key we want */
if (tls_config_set_keypair_mem(tlsconf, h->cert, h->certlen,
@@ -1421,7 +1421,7 @@ load_vhosts(void)
struct vhost *h;
struct location *l;
- TAILQ_FOREACH(h, &hosts, vhosts) {
+ TAILQ_FOREACH(h, &conf.hosts, vhosts) {
TAILQ_FOREACH(l, &h->locations, locations) {
if (*l->dir == '\0')
continue;