diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-10-18 20:52:13 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-10-18 20:52:13 +0000 |
commit | 6676105f5008f5121f5c59d0c302603a5a0004da (patch) | |
tree | 247a4ef86bb2d2b31f45c3fdf99f1e0eee68e338 /usr.sbin/relayd/parse.y | |
parent | 8b92003371cad889543363ed160d5517e1f328bb (diff) |
unbreak tree
Diffstat (limited to 'usr.sbin/relayd/parse.y')
-rw-r--r-- | usr.sbin/relayd/parse.y | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/usr.sbin/relayd/parse.y b/usr.sbin/relayd/parse.y index 8ec99460ac8..414dfa49ffe 100644 --- a/usr.sbin/relayd/parse.y +++ b/usr.sbin/relayd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.67 2007/10/18 20:49:06 pyr Exp $ */ +/* $OpenBSD: parse.y,v 1.68 2007/10/18 20:52:12 deraadt Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -884,7 +884,7 @@ sslcache : NUMBER { relay : RELAY STRING { struct relay *r; - TAILQ_FOREACH(r, conf->relays, entry) + TAILQ_FOREACH(r, &conf->relays, entry) if (!strcmp(r->conf.name, $2)) break; if (r != NULL) { @@ -929,11 +929,9 @@ relay : RELAY STRING { rlay->proto = &conf->proto_default; rlay->conf.proto = conf->proto_default.id; } - if (relay_load_certfile(rlay) == -1) - YYERROR; conf->relaycount++; SPLAY_INIT(&rlay->sessions); - TAILQ_INSERT_HEAD(conf->relays, rlay, entry); + TAILQ_INSERT_HEAD(&conf->relays, rlay, entry); } ; @@ -1577,8 +1575,7 @@ parse_config(const char *filename, int opts) if ((conf = calloc(1, sizeof(*conf))) == NULL || (conf->tables = calloc(1, sizeof(*conf->tables))) == NULL || - (conf->services = calloc(1, sizeof(*conf->services))) == NULL || - (conf->relays = calloc(1, sizeof(*conf->relays))) == NULL) { + (conf->services = calloc(1, sizeof(*conf->services))) == NULL) { warn("cannot allocate memory"); return (NULL); } @@ -1588,8 +1585,8 @@ parse_config(const char *filename, int opts) TAILQ_INIT(conf->services); TAILQ_INIT(conf->tables); - TAILQ_INIT(conf->relays); TAILQ_INIT(&conf->protos); + TAILQ_INIT(&conf->relays); memset(&conf->empty_table, 0, sizeof(conf->empty_table)); conf->empty_table.conf.id = EMPTY_TABLE; @@ -1642,12 +1639,12 @@ parse_config(const char *filename, int opts) } } - if (TAILQ_EMPTY(conf->services) && TAILQ_EMPTY(conf->relays)) { + if (TAILQ_EMPTY(conf->services) && TAILQ_EMPTY(&conf->relays)) { log_warnx("no services, nothing to do"); errors++; } - if (TAILQ_EMPTY(conf->relays)) + if (TAILQ_EMPTY(&conf->relays)) conf->prefork_relay = 0; if (timercmp(&conf->timeout, &conf->interval, >=)) { |