summaryrefslogtreecommitdiff
path: root/sbin/unwind/frontend.c
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2021-01-19 16:52:13 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2021-01-19 16:52:13 +0000
commit7b7b19bcbf98bd77d95e61a7eb8484b6c9e8b30f (patch)
tree1a8d6e1d80d5d90273c46e2fe076c75e4c76be3c /sbin/unwind/frontend.c
parenteb1208909b02261cf68231f0d662ed6f5addf697 (diff)
Move control_state and ctl_conns to control.c, it's not needed
elsewhere and unbreaks -fno-common. Inspired by claudio Problem reported by mortimer
Diffstat (limited to 'sbin/unwind/frontend.c')
-rw-r--r--sbin/unwind/frontend.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/sbin/unwind/frontend.c b/sbin/unwind/frontend.c
index 445dc668726..31291194870 100644
--- a/sbin/unwind/frontend.c
+++ b/sbin/unwind/frontend.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: frontend.c,v 1.62 2021/01/19 16:50:50 florian Exp $ */
+/* $OpenBSD: frontend.c,v 1.63 2021/01/19 16:52:12 florian Exp $ */
/*
* Copyright (c) 2018 Florian Obser <florian@openbsd.org>
@@ -185,7 +185,6 @@ frontend(int debug, int verbose)
struct passwd *pw;
frontend_conf = config_new_empty();
- control_state.fd = -1;
log_init(debug, LOG_DAEMON);
log_setverbose(verbose);
@@ -433,16 +432,11 @@ frontend_dispatch_main(int fd, short event, void *bula)
frontend_startup();
break;
case IMSG_CONTROLFD:
- if (control_state.fd != -1)
- fatalx("%s: received unexpected controlsock",
- __func__);
if ((fd = imsg.fd) == -1)
fatalx("%s: expected to receive imsg control "
"fd but didn't receive any", __func__);
- control_state.fd = fd;
/* Listen on control socket. */
- TAILQ_INIT(&ctl_conns);
- control_listen();
+ control_listen(fd);
break;
case IMSG_TAFD:
if ((ta_fd = imsg.fd) != -1)