From 653e35bca873414964c9cde0bd98bca3e0bf6692 Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Tue, 6 Jul 2010 05:57:20 +0200 Subject: debug: properly parse debug levels Signed-off-by: Patrick McHardy --- src/parser.y | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/parser.y') diff --git a/src/parser.y b/src/parser.y index 7668cbf2..f70b505d 100644 --- a/src/parser.y +++ b/src/parser.y @@ -101,9 +101,11 @@ static void location_update(struct location *loc, struct location *rhs, int n) %initial-action { location_init(scanner, state, &yylloc); -#if 0 - nft_set_debug(1, scanner); - yydebug = 1; +#ifdef DEBUG + if (debug_level & DEBUG_SCANNER) + nft_set_debug(1, scanner); + if (debug_level & DEBUG_PARSER) + yydebug = 1; #endif } -- cgit v1.2.3