diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2007-11-19 15:31:37 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2007-11-19 15:31:37 +0000 |
commit | b886e6eb26b09014dbe87f17b003be41abbbe05f (patch) | |
tree | cce1a39126eb85d420913a6a05e205a20aa0dd68 /usr.sbin/hoststated | |
parent | 4e72c0c8f690ef1ad70ff2ae6306e3f7857c68fc (diff) |
spacing
Diffstat (limited to 'usr.sbin/hoststated')
-rw-r--r-- | usr.sbin/hoststated/control.c | 4 | ||||
-rw-r--r-- | usr.sbin/hoststated/hce.c | 4 | ||||
-rw-r--r-- | usr.sbin/hoststated/hoststated.c | 10 | ||||
-rw-r--r-- | usr.sbin/hoststated/parse.y | 19 | ||||
-rw-r--r-- | usr.sbin/hoststated/pfe.c | 8 | ||||
-rw-r--r-- | usr.sbin/hoststated/relay.c | 8 | ||||
-rw-r--r-- | usr.sbin/hoststated/ssl_privsep.c | 2 |
7 files changed, 28 insertions, 27 deletions
diff --git a/usr.sbin/hoststated/control.c b/usr.sbin/hoststated/control.c index 5ea9d46fb02..22aa3384a00 100644 --- a/usr.sbin/hoststated/control.c +++ b/usr.sbin/hoststated/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.19 2007/10/19 12:08:55 pyr Exp $ */ +/* $OpenBSD: control.c,v 1.20 2007/11/19 15:31:36 reyk Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -316,7 +316,7 @@ control_dispatch_imsg(int fd, short event, void *arg) } break; case IMSG_CTL_SHUTDOWN: - imsg_compose(&c->ibuf, IMSG_CTL_FAIL, 0, 0, -1, NULL, + imsg_compose(&c->ibuf, IMSG_CTL_FAIL, 0, 0, -1, NULL, 0); break; case IMSG_CTL_POLL: diff --git a/usr.sbin/hoststated/hce.c b/usr.sbin/hoststated/hce.c index 62a34e8b6e4..ce00543fe03 100644 --- a/usr.sbin/hoststated/hce.c +++ b/usr.sbin/hoststated/hce.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hce.c,v 1.32 2007/10/19 12:08:55 pyr Exp $ */ +/* $OpenBSD: hce.c,v 1.33 2007/11/19 15:31:36 reyk Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -415,7 +415,7 @@ hce_dispatch_parent(int fd, short event, void * ptr) struct imsgbuf *ibuf; struct imsg imsg; struct ctl_script scr; - ssize_t n; + ssize_t n; size_t len; static struct table *table = NULL; diff --git a/usr.sbin/hoststated/hoststated.c b/usr.sbin/hoststated/hoststated.c index 9879309d7c6..7d800f39a36 100644 --- a/usr.sbin/hoststated/hoststated.c +++ b/usr.sbin/hoststated/hoststated.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hoststated.c,v 1.53 2007/11/19 14:48:19 reyk Exp $ */ +/* $OpenBSD: hoststated.c,v 1.54 2007/11/19 15:31:36 reyk Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -244,12 +244,12 @@ main(int argc, char *argv[]) } if ((ibuf_pfe = calloc(1, sizeof(struct imsgbuf))) == NULL || - (ibuf_hce = calloc(1, sizeof(struct imsgbuf))) == NULL) + (ibuf_hce = calloc(1, sizeof(struct imsgbuf))) == NULL) fatal(NULL); if (env->prefork_relay > 0) { if ((ibuf_relay = calloc(env->prefork_relay, - sizeof(struct imsgbuf))) == NULL) + sizeof(struct imsgbuf))) == NULL) fatal(NULL); } @@ -338,7 +338,7 @@ send_all(struct hoststated *env, enum imsg_type type, void *buf, u_int16_t len) if (imsg_compose(ibuf_hce, type, 0, 0, -1, buf, len) == -1) return (-1); for (i = 0; i < env->prefork_relay; i++) { - if (imsg_compose(&ibuf_relay[i], type, 0, 0, -1, buf, len) + if (imsg_compose(&ibuf_relay[i], type, 0, 0, -1, buf, len) == -1) return (-1); } @@ -424,7 +424,7 @@ reconfigure(void) imsg_compose(ibuf_hce, IMSG_RECONF_SENDBUF, 0, 0, -1, table->sendbuf, strlen(table->sendbuf) + 1); TAILQ_FOREACH(host, &table->hosts, entry) { - imsg_compose(ibuf_hce, IMSG_RECONF_HOST, 0, 0, -1, + imsg_compose(ibuf_hce, IMSG_RECONF_HOST, 0, 0, -1, &host->conf, sizeof(host->conf)); } } diff --git a/usr.sbin/hoststated/parse.y b/usr.sbin/hoststated/parse.y index 689cd6ab752..859ddbf2798 100644 --- a/usr.sbin/hoststated/parse.y +++ b/usr.sbin/hoststated/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.83 2007/11/19 15:20:18 reyk Exp $ */ +/* $OpenBSD: parse.y,v 1.84 2007/11/19 15:31:36 reyk Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -186,7 +186,7 @@ hostname : /* empty */ { if (asprintf(&$$, "Host: %s\r\n", $2) == -1) fatal("asprintf"); } - ; + ; proto_type : TCP { $$ = RELAY_PROTO_TCP; } | STRING { @@ -325,7 +325,7 @@ service : SERVICE STRING { } conf->servicecount++; if (service->backup == NULL) { - service->conf.backup_id = + service->conf.backup_id = conf->empty_table.conf.id; service->backup = &conf->empty_table; } else if (service->backup->conf.port != @@ -641,7 +641,7 @@ protoptsl : SSL sslflags | TCP '{' tcpflags_l '}' | PROTO proto_type { proto->type = $2; } | direction protonode log { - struct protonode *pn, *proot, pk; + struct protonode *pn, *proot, pk; struct proto_tree *tree; if ($1 == RELAY_DIR_RESPONSE) @@ -678,7 +678,7 @@ protoptsl : SSL sslflags SIMPLEQ_INSERT_TAIL(&proot->head, pn, entry); } - if (node.type == NODE_TYPE_COOKIE) + if (node.type == NODE_TYPE_COOKIE) pk.key = "Cookie"; else pk.key = "GET"; @@ -732,7 +732,7 @@ tcpflags_l : tcpflags comma tcpflags_l | tcpflags ; -tcpflags : SACK { proto->tcpflags |= TCPFLAG_SACK; } +tcpflags : SACK { proto->tcpflags |= TCPFLAG_SACK; } | NO SACK { proto->tcpflags |= TCPFLAG_NSACK; } | NODELAY { proto->tcpflags |= TCPFLAG_NODELAY; } | NO NODELAY { proto->tcpflags |= TCPFLAG_NNODELAY; } @@ -971,7 +971,7 @@ relayopts_l : relayopts_l relayoptsl nl ; relayoptsl : LISTEN ON STRING port optssl { - struct addresslist al; + struct addresslist al; struct address *h; if (rlay->conf.ss.ss_family != AF_UNSPEC) { @@ -996,7 +996,7 @@ relayoptsl : LISTEN ON STRING port optssl { } } | FORWARD TO STRING port retry { - struct addresslist al; + struct addresslist al; struct address *h; if (rlay->conf.dstss.ss_family != AF_UNSPEC) { @@ -1318,7 +1318,8 @@ lgetc(int quotec) if (quotec) { if ((c = getc(file->stream)) == EOF) { - yyerror("reached end of file while parsing quoted string"); + yyerror("reached end of file while parsing " + "quoted string"); if (popfile() == EOF) return (EOF); return (quotec); diff --git a/usr.sbin/hoststated/pfe.c b/usr.sbin/hoststated/pfe.c index 465763103da..0fabf35b329 100644 --- a/usr.sbin/hoststated/pfe.c +++ b/usr.sbin/hoststated/pfe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfe.c,v 1.41 2007/11/15 17:02:01 pyr Exp $ */ +/* $OpenBSD: pfe.c,v 1.42 2007/11/19 15:31:36 reyk Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -275,7 +275,7 @@ pfe_dispatch_imsg(int fd, short event, void *ptr) for (n = 0; n < env->prefork_relay; n++) imsg_compose(&ibuf_relay[n], IMSG_HOST_STATUS, 0, 0, -1, &st, - sizeof(st)); + sizeof(st)); if ((table = table_find(env, host->conf.tableid)) == NULL) @@ -803,7 +803,7 @@ enable_host(struct ctl_conn *c, struct ctl_id *id) host->flags &= ~(F_DEL); host->flags &= ~(F_ADD); - imsg_compose(ibuf_hce, IMSG_HOST_ENABLE, 0, 0, -1, + imsg_compose(ibuf_hce, IMSG_HOST_ENABLE, 0, 0, -1, &host->conf.id, sizeof (host->conf.id)); /* Forward to relay engine(s) */ for (n = 0; n < env->prefork_relay; n++) @@ -883,7 +883,7 @@ pfe_sync(void) * clean up change flag. */ table->conf.flags &= ~(F_CHANGED); - + /* * handle demotion. */ diff --git a/usr.sbin/hoststated/relay.c b/usr.sbin/hoststated/relay.c index 06f1e64619f..3b4077bbcf7 100644 --- a/usr.sbin/hoststated/relay.c +++ b/usr.sbin/hoststated/relay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: relay.c,v 1.54 2007/11/19 14:48:19 reyk Exp $ */ +/* $OpenBSD: relay.c,v 1.55 2007/11/19 15:31:36 reyk Exp $ */ /* * Copyright (c) 2006, 2007 Reyk Floeter <reyk@openbsd.org> @@ -1211,7 +1211,7 @@ relay_read_http(struct bufferevent *bev, void *arg) free(line); goto fail; } - + DPRINTF("relay_read_http: request '%s'", line); /* Append line to the output buffer */ if (relay_bufferevent_print(cre->dst, line) == -1 || @@ -1621,7 +1621,7 @@ relay_accept(int fd, short sig, void *arg) cnl->proc = proc_id; bcopy(&con->in.ss, &cnl->src, sizeof(cnl->src)); bcopy(&rlay->conf.ss, &cnl->dst, sizeof(cnl->dst)); - imsg_compose(ibuf_pfe, IMSG_NATLOOK, 0, 0, -1, cnl, + imsg_compose(ibuf_pfe, IMSG_NATLOOK, 0, 0, -1, cnl, sizeof(*cnl)); /* Schedule timeout */ @@ -2489,7 +2489,7 @@ relay_load_file(const char *name, off_t *len) struct stat st; off_t size; u_int8_t *buf = NULL; - int fd; + int fd; if ((fd = open(name, O_RDONLY)) == -1) return (NULL); diff --git a/usr.sbin/hoststated/ssl_privsep.c b/usr.sbin/hoststated/ssl_privsep.c index 22cff346e95..7b4626427fa 100644 --- a/usr.sbin/hoststated/ssl_privsep.c +++ b/usr.sbin/hoststated/ssl_privsep.c @@ -134,7 +134,7 @@ ssl_ctx_use_certificate_chain(SSL_CTX *ctx, char *buf, off_t len) /* If we could set up our certificate, now proceed to * the CA certificates. */ - + if (ctx->extra_certs != NULL) { sk_X509_pop_free(ctx->extra_certs, X509_free); ctx->extra_certs = NULL; |