From: Kevin Day Date: Fri, 19 Jul 2019 03:38:41 +0000 (-0500) Subject: Bugfix: firewall show command operating as lock X-Git-Tag: 0.5.0~525 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=9c794890728636f6a63b205a6533b833c0d2389c;p=fll Bugfix: firewall show command operating as lock The debug parameters is conditionally enabled/disabled but the enum is not. Make the enum conditionally enable/disable the debug option to prevent the wrong id from being used when debug is disabled. Fix the alignment of the debug message. Conditionally enable/disable displaying the debug in the help. --- diff --git a/level_3/firewall/c/firewall.c b/level_3/firewall/c/firewall.c index 8bd26e7..cab0d10 100644 --- a/level_3/firewall/c/firewall.c +++ b/level_3/firewall/c/firewall.c @@ -59,12 +59,14 @@ extern "C" { fl_print_color(f_standard_output, data.context.standout, data.context.reset, f_console_standard_long_version); printf(" Print only the version number"); - printf("\n %s", f_console_symbol_short_disable); - fl_print_color(f_standard_output, data.context.standout, data.context.reset, f_console_standard_short_debug); - - printf(", %s", f_console_symbol_long_disable); - fl_print_color(f_standard_output, data.context.standout, data.context.reset, f_console_standard_long_debug); - printf(" Enable debugging"); + #ifdef _en_firewall_debug_ + printf("\n %s", f_console_symbol_short_disable); + fl_print_color(f_standard_output, data.context.standout, data.context.reset, f_console_standard_short_debug); + + printf(", %s", f_console_symbol_long_disable); + fl_print_color(f_standard_output, data.context.standout, data.context.reset, f_console_standard_long_debug); + printf(" Enable debugging"); + #endif // _en_firewall_debug_ printf("\n\n"); fl_print_color(f_standard_output, data.context.important, data.context.reset, " Available Commands: "); diff --git a/level_3/firewall/c/firewall.h b/level_3/firewall/c/firewall.h index 8d3f3ed..c4b152d 100644 --- a/level_3/firewall/c/firewall.h +++ b/level_3/firewall/c/firewall.h @@ -212,7 +212,11 @@ extern "C" { firewall_parameter_light, firewall_parameter_no_color, firewall_parameter_version, - firewall_parameter_debug, + + #ifdef _en_firewall_debug_ + firewall_parameter_debug, + #endif // _en_firewall_debug_ + firewall_parameter_command_start, firewall_parameter_command_stop, firewall_parameter_command_restart,