diff options
author | denis <denis@cvs.openbsd.org> | 2020-01-01 10:09:35 +0000 |
---|---|---|
committer | denis <denis@cvs.openbsd.org> | 2020-01-01 10:09:35 +0000 |
commit | 3dbcc940f06d8d3b5db12c7fde0d994b2f38f1bf (patch) | |
tree | 709301e48674baeeff22480a121f08f68e4b14ac /usr.sbin | |
parent | cbb309b4d7b2aba85f0cfd4f5dcb69d820f26db6 (diff) |
Cleanup control.
"Looks fine" deraadt@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ospf6d/control.c | 12 | ||||
-rw-r--r-- | usr.sbin/ospf6d/ospfe.c | 6 |
2 files changed, 7 insertions, 11 deletions
diff --git a/usr.sbin/ospf6d/control.c b/usr.sbin/ospf6d/control.c index 191d09c25c1..72f91b42faa 100644 --- a/usr.sbin/ospf6d/control.c +++ b/usr.sbin/ospf6d/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.27 2018/09/01 19:21:10 remi Exp $ */ +/* $OpenBSD: control.c,v 1.28 2020/01/01 10:09:34 denis Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -64,7 +64,6 @@ control_check(char *path) return (0); } - int control_init(char *path) { @@ -127,10 +126,11 @@ control_listen(void) void control_cleanup(char *path) { + if (path == NULL) + return; event_del(&control_state.ev); event_del(&control_state.evt); - if (path) - unlink(path); + unlink(path); } /* ARGSUSED */ @@ -237,7 +237,7 @@ control_dispatch_imsg(int fd, short event, void *bula) { struct ctl_conn *c; struct imsg imsg; - int n; + ssize_t n; unsigned int ifidx; int verbose; @@ -289,7 +289,7 @@ control_dispatch_imsg(int fd, short event, void *bula) sizeof(ifidx)) { memcpy(&ifidx, imsg.data, sizeof(ifidx)); ospfe_iface_ctl(c, ifidx); - imsg_compose(&c->iev.ibuf, IMSG_CTL_END, 0, + imsg_compose_event(&c->iev, IMSG_CTL_END, 0, 0, -1, NULL, 0); } break; diff --git a/usr.sbin/ospf6d/ospfe.c b/usr.sbin/ospf6d/ospfe.c index ffdec467e84..5d0744681f7 100644 --- a/usr.sbin/ospf6d/ospfe.c +++ b/usr.sbin/ospf6d/ospfe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ospfe.c,v 1.59 2019/12/28 09:25:24 denis Exp $ */ +/* $OpenBSD: ospfe.c,v 1.60 2020/01/01 10:09:34 denis Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -175,10 +175,6 @@ ospfe(struct ospfd_conf *xconf, int pipe_parent2ospfe[2], int pipe_ospfe2rde[2], /* remove unneeded config stuff */ conf_clear_redist_list(&oeconf->redist_list); - /* listen on ospfd control socket */ - TAILQ_INIT(&ctl_conns); - control_listen(); - if ((pkt_ptr = calloc(1, READ_BUF_SIZE)) == NULL) fatal("ospfe"); |