When built with enable_debug=no, the parameter output expected at --verb
4 is not printed due to use of #ifdef ENABLE_DEBUG in the responsible
code sections. This appears to be a mistake when looking at the
configure help text for enable_small and enable_debug.
This change keys the relevant code off of enable_small instead,
including the parameter listing when enale_small=no (the
configure-script default.) Most of this code is in options.c, with some
callers present in plugin.c/h and route.c/h. No function code is
changed, just the #ifdef values to use the small feature instead of
debug.
This means builds no longer need enable_debug=yes in order to get the
expected log output at verb 4.
Signed-off-by: Josh Cepek <josh.cepek@usa.net>
Acked-by: Arne Schwabe <arne@rfc2549.org>
Message-Id: <437RBuq1U8032S07.1361465626@web07.cms.usa.net>
URL: http://article.gmane.org/gmane.network.openvpn.devel/7361
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit 6c61d0dd339084175f6911d8b713faaf4967ca03)
... | ... |
@@ -881,7 +881,7 @@ uninit_options (struct options *o) |
881 | 881 |
} |
882 | 882 |
} |
883 | 883 |
|
884 |
-#ifdef ENABLE_DEBUG |
|
884 |
+#ifndef ENABLE_SMALL |
|
885 | 885 |
|
886 | 886 |
#define SHOW_PARM(name, value, format) msg(D_SHOW_PARMS, " " #name " = " format, (value)) |
887 | 887 |
#define SHOW_STR(var) SHOW_PARM(var, (o->var ? o->var : "[UNDEF]"), "'%s'") |
... | ... |
@@ -1081,7 +1081,7 @@ parse_hash_fingerprint(const char *str, int nbytes, int msglevel, struct gc_aren |
1081 | 1081 |
|
1082 | 1082 |
#ifdef WIN32 |
1083 | 1083 |
|
1084 |
-#ifdef ENABLE_DEBUG |
|
1084 |
+#ifndef ENABLE_SMALL |
|
1085 | 1085 |
|
1086 | 1086 |
static void |
1087 | 1087 |
show_dhcp_option_addrs (const char *name, const in_addr_t *array, int len) |
... | ... |
@@ -1153,7 +1153,7 @@ dhcp_option_address_parse (const char *name, const char *parm, in_addr_t *array, |
1153 | 1153 |
|
1154 | 1154 |
#if P2MP |
1155 | 1155 |
|
1156 |
-#ifdef ENABLE_DEBUG |
|
1156 |
+#ifndef ENABLE_SMALL |
|
1157 | 1157 |
|
1158 | 1158 |
static void |
1159 | 1159 |
show_p2mp_parms (const struct options *o) |
... | ... |
@@ -1225,7 +1225,7 @@ show_p2mp_parms (const struct options *o) |
1225 | 1225 |
gc_free (&gc); |
1226 | 1226 |
} |
1227 | 1227 |
|
1228 |
-#endif /* ENABLE_DEBUG */ |
|
1228 |
+#endif /* ! ENABLE_SMALL */ |
|
1229 | 1229 |
|
1230 | 1230 |
#if P2MP_SERVER |
1231 | 1231 |
|
... | ... |
@@ -1279,7 +1279,7 @@ option_iroute_ipv6 (struct options *o, |
1279 | 1279 |
#endif /* P2MP_SERVER */ |
1280 | 1280 |
#endif /* P2MP */ |
1281 | 1281 |
|
1282 |
-#if defined(ENABLE_HTTP_PROXY) && defined(ENABLE_DEBUG) |
|
1282 |
+#if defined(ENABLE_HTTP_PROXY) && !defined(ENABLE_SMALL) |
|
1283 | 1283 |
static void |
1284 | 1284 |
show_http_proxy_options (const struct http_proxy_options *o) |
1285 | 1285 |
{ |
... | ... |
@@ -1332,7 +1332,7 @@ cnol_check_alloc (struct options *options) |
1332 | 1332 |
} |
1333 | 1333 |
#endif |
1334 | 1334 |
|
1335 |
-#ifdef ENABLE_DEBUG |
|
1335 |
+#ifndef ENABLE_SMALL |
|
1336 | 1336 |
static void |
1337 | 1337 |
show_connection_entry (const struct connection_entry *o) |
1338 | 1338 |
{ |
... | ... |
@@ -1400,7 +1400,7 @@ show_connection_entries (const struct options *o) |
1400 | 1400 |
void |
1401 | 1401 |
show_settings (const struct options *o) |
1402 | 1402 |
{ |
1403 |
-#ifdef ENABLE_DEBUG |
|
1403 |
+#ifndef ENABLE_SMALL |
|
1404 | 1404 |
msg (D_SHOW_PARMS, "Current Parameter Settings:"); |
1405 | 1405 |
|
1406 | 1406 |
SHOW_STR (config); |
... | ... |
@@ -155,7 +155,7 @@ plugin_option_list_add (struct plugin_option_list *list, char **p, struct gc_are |
155 | 155 |
return false; |
156 | 156 |
} |
157 | 157 |
|
158 |
-#ifdef ENABLE_DEBUG |
|
158 |
+#ifndef ENABLE_SMALL |
|
159 | 159 |
void |
160 | 160 |
plugin_option_list_print (const struct plugin_option_list *list, int msglevel) |
161 | 161 |
{ |
... | ... |
@@ -108,7 +108,7 @@ struct plugin_return |
108 | 108 |
struct plugin_option_list *plugin_option_list_new (struct gc_arena *gc); |
109 | 109 |
bool plugin_option_list_add (struct plugin_option_list *list, char **p, struct gc_arena *gc); |
110 | 110 |
|
111 |
-#ifdef ENABLE_DEBUG |
|
111 |
+#ifndef ENABLE_SMALL |
|
112 | 112 |
void plugin_option_list_print (const struct plugin_option_list *list, int msglevel); |
113 | 113 |
#endif |
114 | 114 |
|
... | ... |
@@ -290,7 +290,7 @@ void print_default_gateway(const int msglevel, const struct route_gateway_info * |
290 | 290 |
#define TLA_LOCAL 2 |
291 | 291 |
int test_local_addr (const in_addr_t addr, const struct route_gateway_info *rgi); |
292 | 292 |
|
293 |
-#ifdef ENABLE_DEBUG |
|
293 |
+#ifndef ENABLE_SMALL |
|
294 | 294 |
void print_route_options (const struct route_option_list *rol, |
295 | 295 |
int level); |
296 | 296 |
#endif |