From: Arne Schwabe Date: Thu, 11 Apr 2013 13:34:38 +0000 (+0200) Subject: Print client id only if compiled with man agent support. Otherwise X-Git-Tag: v2.4_alpha1~580 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=01cfa61a41e5162ba2f61383e03ff66741511d3a;p=thirdparty%2Fopenvpn.git 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 --- diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index 1dbdb7fd6..5900523ef 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); }