]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Print client id only if compiled with man agent support. Otherwise
authorArne Schwabe <arne@rfc2549.org>
Thu, 11 Apr 2013 13:34:38 +0000 (15:34 +0200)
committerGert Doering <gert@greenie.muc.de>
Thu, 11 Apr 2013 14:00:00 +0000 (16:00 +0200)
print an empty string.

Also use %lu instead of %u for printing unsigned long int

Acked-by: Gert Doering <gert@greenie.muc.de>
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 <gert@greenie.muc.de>
src/openvpn/multi.c

index 1dbdb7fd67c74f72f38ccafc1a4d44baf726a467..5900523eff89eda93ca624baf55afba3c55665bf 100644 (file)
@@ -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);
            }