diff options
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/eigrpd/eigrpd.c | 12 | ||||
-rw-r--r-- | usr.sbin/eigrpd/eigrpe.c | 16 | ||||
-rw-r--r-- | usr.sbin/eigrpd/rde.c | 16 |
3 files changed, 15 insertions, 29 deletions
diff --git a/usr.sbin/eigrpd/eigrpd.c b/usr.sbin/eigrpd/eigrpd.c index e5103cc2631..f75e00ccc0b 100644 --- a/usr.sbin/eigrpd/eigrpd.c +++ b/usr.sbin/eigrpd/eigrpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: eigrpd.c,v 1.11 2016/04/15 13:21:45 renato Exp $ */ +/* $OpenBSD: eigrpd.c,v 1.12 2016/04/15 13:31:03 renato Exp $ */ /* * Copyright (c) 2015 Renato Westphal <renato@openbsd.org> @@ -406,9 +406,8 @@ main_dispatch_eigrpe(int fd, short event, void *bula) if (!shut) imsg_event_add(iev); else { - /* this pipe is dead, so remove the event handler */ - event_del(&iev->ev); - event_loopexit(NULL); + eigrpe_pid = 0; + eigrpd_shutdown(); } } @@ -470,9 +469,8 @@ main_dispatch_rde(int fd, short event, void *bula) if (!shut) imsg_event_add(iev); else { - /* this pipe is dead, so remove the event handler */ - event_del(&iev->ev); - event_loopexit(NULL); + rde_pid = 0; + eigrpd_shutdown(); } } diff --git a/usr.sbin/eigrpd/eigrpe.c b/usr.sbin/eigrpd/eigrpe.c index 85ea783da42..8266082ad43 100644 --- a/usr.sbin/eigrpd/eigrpe.c +++ b/usr.sbin/eigrpd/eigrpe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: eigrpe.c,v 1.18 2016/04/15 13:27:58 renato Exp $ */ +/* $OpenBSD: eigrpe.c,v 1.19 2016/04/15 13:31:03 renato Exp $ */ /* * Copyright (c) 2015 Renato Westphal <renato@openbsd.org> @@ -400,11 +400,8 @@ eigrpe_dispatch_main(int fd, short event, void *bula) } if (!shut) imsg_event_add(iev); - else { - /* this pipe is dead, so remove the event handler */ - event_del(&iev->ev); - event_loopexit(NULL); - } + else + eigrpe_shutdown(); } /* ARGSUSED */ @@ -561,11 +558,8 @@ eigrpe_dispatch_rde(int fd, short event, void *bula) } if (!shut) imsg_event_add(iev); - else { - /* this pipe is dead, so remove the event handler */ - event_del(&iev->ev); - event_loopexit(NULL); - } + else + eigrpe_shutdown(); } void diff --git a/usr.sbin/eigrpd/rde.c b/usr.sbin/eigrpd/rde.c index 9dfd4d3ebc6..39f94bd0b0f 100644 --- a/usr.sbin/eigrpd/rde.c +++ b/usr.sbin/eigrpd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.13 2016/04/15 13:27:58 renato Exp $ */ +/* $OpenBSD: rde.c,v 1.14 2016/04/15 13:31:03 renato Exp $ */ /* * Copyright (c) 2015 Renato Westphal <renato@openbsd.org> @@ -315,11 +315,8 @@ rde_dispatch_imsg(int fd, short event, void *bula) } if (!shut) imsg_event_add(iev); - else { - /* this pipe is dead, so remove the event handler */ - event_del(&iev->ev); - event_loopexit(NULL); - } + else + rde_shutdown(); } /* ARGSUSED */ @@ -444,11 +441,8 @@ rde_dispatch_parent(int fd, short event, void *bula) } if (!shut) imsg_event_add(iev); - else { - /* this pipe is dead, so remove the event handler */ - event_del(&iev->ev); - event_loopexit(NULL); - } + else + rde_shutdown(); } void |