From: Arne Schwabe Date: Sat, 13 Aug 2022 21:11:04 +0000 (+0200) Subject: Include DCO status in GLOBAL_STATS status v2 output X-Git-Tag: v2.6_beta1~108 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b421a0d55afc6e7a566b97cf9b687824be5a9118;p=thirdparty%2Fopenvpn.git Include DCO status in GLOBAL_STATS status v2 output This is allows querying the DCO status from management interface or by sending SIGUSR2 without doing an error-prone parsing of the startup log. Also remove comment that serves no purpose anymore. Signed-off-by: Arne Schwabe Acked-by: Lev Stipakov Message-Id: <20220813211104.411554-1-arne@rfc2549.org> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg24923.html Signed-off-by: Gert Doering --- diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index 53ee3e1a1..95414429f 100644 --- a/src/openvpn/multi.c +++ b/src/openvpn/multi.c @@ -837,7 +837,7 @@ multi_print_status(struct multi_context *m, struct status_output *so, const int status_reset(so); - if (version == 1) /* WAS: m->status_file_version */ + if (version == 1) { /* * Status file version 1 @@ -984,6 +984,7 @@ multi_print_status(struct multi_context *m, struct status_output *so, const int sep, sep, mbuf_maximum_queued(m->mbuf)); } + status_printf(so, "GLOBAL_STATS%cdco_enabled%c%d", sep, sep, dco_enabled(&m->top.options)); status_printf(so, "END"); } else