summaryrefslogtreecommitdiffstats
path: root/options.c
diff options
context:
space:
mode:
authorDavid Sommerseth <davids@redhat.com>2012-02-13 16:03:46 +0100
committerDavid Sommerseth <davids@redhat.com>2012-02-13 17:15:24 +0100
commitecede953d6366e9fbfecea62cc1f61fd2347dab7 (patch)
tree0be3340cdadf52d1d19fcc5e16830532a675c294 /options.c
parent22277ec675847f73203bf908144f9903d13e2869 (diff)
downloadopenvpn-ecede953d6366e9fbfecea62cc1f61fd2347dab7.tar.gz
openvpn-ecede953d6366e9fbfecea62cc1f61fd2347dab7.tar.xz
openvpn-ecede953d6366e9fbfecea62cc1f61fd2347dab7.zip
Remove --show-gateway if debug info is not enabled (--disable-debug)
The --show-gateway feature depends on functions only being enabled when --disable-debug is _not_ used. As this I consider --show-gateway more a handy function for debugging, removing this feature when --disable-debug is used seems like the proper approach. Signed-off-by: David Sommerseth <davids@redhat.com> Acked-by: Gert Doering <gert@greenie.muc.de>
Diffstat (limited to 'options.c')
-rw-r--r--options.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/options.c b/options.c
index 42b0b52..bfba5c4 100644
--- a/options.c
+++ b/options.c
@@ -735,7 +735,9 @@ static const char usage_message[] =
#endif /* ENABLE_PKCS11 */
"\n"
"General Standalone Options:\n"
+#ifdef ENABLE_DEBUG
"--show-gateway : Show info about default gateway.\n"
+#endif
;
#endif /* !ENABLE_SMALL */
@@ -4058,6 +4060,7 @@ add_option (struct options *options,
read_config_file (options, p[1], level, file, line, msglevel, permission_mask, option_types_found, es);
}
+#ifdef ENABLE_DEBUG
else if (streq (p[0], "show-gateway"))
{
struct route_gateway_info rgi;
@@ -4066,6 +4069,7 @@ add_option (struct options *options,
print_default_gateway(M_INFO, &rgi);
openvpn_exit (OPENVPN_EXIT_STATUS_GOOD); /* exit point */
}
+#endif
#if 0
else if (streq (p[0], "foreign-option") && p[1])
{