From 01cfa61a41e5162ba2f61383e03ff66741511d3a Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Thu, 11 Apr 2013 15:34:38 +0200 Subject: Print client id only if compiled with man agent support. Otherwise print an empty string. Also use %lu instead of %u for printing unsigned long int Acked-by: Gert Doering Message-Id: <1365687278-3921-1-git-send-email-arne@rfc2549.org> URL: http://article.gmane.org/gmane.network.openvpn.devel/7498 Signed-off-by: Gert Doering --- src/openvpn/multi.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index 1dbdb7f..5900523 100644 --- a/src/openvpn/multi.c +++ b/src/openvpn/multi.c @@ -817,7 +817,12 @@ multi_print_status (struct multi_context *m, struct status_output *so, const int if (!mi->halt) { - status_printf (so, "CLIENT_LIST%c%s%c%s%c%s%c" counter_format "%c" counter_format "%c%s%c%u%c%s%c%u", + status_printf (so, "CLIENT_LIST%c%s%c%s%c%s%c" counter_format "%c" counter_format "%c%s%c%u%c%s%c" +#ifdef MANAGEMENT_DEF_AUTH + "%lu", +#else + "", +#endif sep, tls_common_name (mi->context.c2.tls_multi, false), sep, mroute_addr_print (&mi->real, &gc), sep, print_in_addr_t (mi->reporting_addr, IA_EMPTY_IF_UNDEF, &gc), @@ -826,7 +831,11 @@ multi_print_status (struct multi_context *m, struct status_output *so, const int sep, time_string (mi->created, 0, false, &gc), sep, (unsigned int)mi->created, sep, tls_username (mi->context.c2.tls_multi, false), - sep, mi->context.c2.mda_context.cid); +#ifdef MANAGEMENT_DEF_AUTH + sep, mi->context.c2.mda_context.cid); +#else + sep); +#endif } gc_free (&gc); } -- cgit