diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-03-10 14:29:38 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-03-10 14:29:38 +0000 |
commit | 0f19558f9f07930052353aba7b3d13834b933bca (patch) | |
tree | ac99f12f1b29de9be3d02c507bdddce1308c7224 /usr.sbin/bgpd/session.c | |
parent | 774865b4b4e1e36719b0e4e6a0d46270593e0c64 (diff) |
when we exit try to write out what is left in the msg buffers for the imsg
pipes and clear buffers afterwards
Diffstat (limited to 'usr.sbin/bgpd/session.c')
-rw-r--r-- | usr.sbin/bgpd/session.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c index fbab673f156..61477b44e11 100644 --- a/usr.sbin/bgpd/session.c +++ b/usr.sbin/bgpd/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.129 2004/03/10 13:45:16 henning Exp $ */ +/* $OpenBSD: session.c,v 1.130 2004/03/10 14:29:37 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -348,6 +348,11 @@ session_main(struct bgpd_config *config, struct peer *cpeers, int pipe_m2s[2], for (p = peers; p != NULL; p = p->next) bgp_fsm(p, EVNT_STOP); + msgbuf_write(&ibuf_rde.w); + msgbuf_clear(&ibuf_rde.w); + msgbuf_write(&ibuf_main.w); + msgbuf_clear(&ibuf_main.w); + control_shutdown(); log_info("session engine exiting"); _exit(0); |