From 1594a79a0b6c74b271cf476c211bb5ff1578187d Mon Sep 17 00:00:00 2001 From: Phil Pennock Date: Sun, 23 Jan 2011 05:41:55 -0500 Subject: [PATCH] Loadable modules: fix debug invocations The new code was calling DEBUG() for values of n including 4, 5, 9; that was an Exim 3 API, we now use bits; -v sets bit 0x1, -bP implies -v, so { exim -bP } was pulling up random debug messages. Switched all the DEBUG checks to be DEBUG(D_lookup). --- src/src/drtables.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/src/drtables.c b/src/src/drtables.c index 563670a38..f0c131d20 100644 --- a/src/src/drtables.c +++ b/src/src/drtables.c @@ -492,11 +492,11 @@ extern lookup_module_info whoson_lookup_module_info; #ifdef LOOKUP_MODULE_DIR dd = opendir(LOOKUP_MODULE_DIR); if (dd == NULL) { - DEBUG(5) debug_printf("Couldn't open %s: not loading lookup modules\n", LOOKUP_MODULE_DIR); + DEBUG(D_lookup) debug_printf("Couldn't open %s: not loading lookup modules\n", LOOKUP_MODULE_DIR); log_write(0, LOG_MAIN, "Couldn't open %s: not loading lookup modules\n", LOOKUP_MODULE_DIR); } else { - DEBUG(9) debug_printf("Loading lookup modules from %s\n", LOOKUP_MODULE_DIR); + DEBUG(D_lookup) debug_printf("Loading lookup modules from %s\n", LOOKUP_MODULE_DIR); while ((ent = readdir(dd)) != NULL) { char *name = ent->d_name; int len = (int)strlen(name); @@ -548,19 +548,19 @@ extern lookup_module_info whoson_lookup_module_info; } addlookupmodule(dl, info); - DEBUG(9) debug_printf("Loaded \"%s\" (%d lookup types)\n", name, info->lookupcount); + DEBUG(D_lookup) debug_printf("Loaded \"%s\" (%d lookup types)\n", name, info->lookupcount); countmodules++; } } closedir(dd); } - DEBUG(9) debug_printf("Loaded %d lookup modules\n", countmodules); + DEBUG(D_lookup) debug_printf("Loaded %d lookup modules\n", countmodules); #endif store_free((void*)regex_islookupmod); - DEBUG(4) debug_printf("Total %d lookups\n", lookup_list_count); + DEBUG(D_lookup) debug_printf("Total %d lookups\n", lookup_list_count); lookup_list = store_malloc(sizeof(lookup_info *) * lookup_list_count); memset(lookup_list, 0, sizeof(lookup_info *) * lookup_list_count); -- 2.30.2