-/* $OpenBSD: rde.c,v 1.364 2017/05/28 12:21:36 claudio Exp $ */
+/* $OpenBSD: rde.c,v 1.365 2017/05/28 20:10:59 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
rde_dump_runner();
}
+ /* do not clean up on shutdown on production, it takes ages. */
+ if (debug)
+ rde_shutdown();
+
/* close pipes */
if (ibuf_se) {
msgbuf_clear(&ibuf_se->w);
close(ibuf_main->fd);
free(ibuf_main);
- /* do not clean up on shutdown on production, it takes ages. */
- if (debug)
- rde_shutdown();
-
while ((mctx = LIST_FIRST(&rde_mrts)) != NULL) {
msgbuf_clear(&mctx->mrt.wbuf);
close(mctx->mrt.wbuf.fd);
-/* $OpenBSD: session.c,v 1.362 2017/05/28 12:21:36 claudio Exp $ */
+/* $OpenBSD: session.c,v 1.363 2017/05/28 20:10:59 claudio Exp $ */
/*
* Copyright (c) 2003, 2004, 2005 Henning Brauer <henning@openbsd.org>
control_dispatch_msg(&pfd[j], &ctl_cnt);
}
- /* close pipes */
- if (ibuf_rde) {
- msgbuf_write(&ibuf_rde->w);
- msgbuf_clear(&ibuf_rde->w);
- close(ibuf_rde->fd);
- free(ibuf_rde);
- }
- if (ibuf_rde_ctl) {
- msgbuf_clear(&ibuf_rde_ctl->w);
- close(ibuf_rde_ctl->fd);
- free(ibuf_rde_ctl);
- }
- msgbuf_write(&ibuf_main->w);
- msgbuf_clear(&ibuf_main->w);
- close(ibuf_main->fd);
- free(ibuf_main);
-
while ((p = peers) != NULL) {
peers = p->next;
strlcpy(p->conf.shutcomm,
free(mrt_l);
free(pfd);
+ /* close pipes */
+ if (ibuf_rde) {
+ msgbuf_write(&ibuf_rde->w);
+ msgbuf_clear(&ibuf_rde->w);
+ close(ibuf_rde->fd);
+ free(ibuf_rde);
+ }
+ if (ibuf_rde_ctl) {
+ msgbuf_clear(&ibuf_rde_ctl->w);
+ close(ibuf_rde_ctl->fd);
+ free(ibuf_rde_ctl);
+ }
+ msgbuf_write(&ibuf_main->w);
+ msgbuf_clear(&ibuf_main->w);
+ close(ibuf_main->fd);
+ free(ibuf_main);
control_shutdown(csock);
control_shutdown(rcsock);