[exim-cvs] Loadable modules: fix debug invocations

Pàgina inicial
Delete this message
Reply to this message
Autor: Exim Git Commits Mailing List
Data:  
A: exim-cvs
Assumpte: [exim-cvs] Loadable modules: fix debug invocations
Gitweb: http://git.exim.org/exim.git/commitdiff/1594a79a0b6c74b271cf476c211bb5ff1578187d
Commit:     1594a79a0b6c74b271cf476c211bb5ff1578187d
Parent:     b7487bcec431809cb7fc3c2b42fcd607e43d37e7
Author:     Phil Pennock <pdp@???>
AuthorDate: Sun Jan 23 05:41:55 2011 -0500
Committer:  Phil Pennock <pdp@???>
CommitDate: Sun Jan 23 05:44:54 2011 -0500


    Loadable modules: fix debug invocations


    The new code was calling DEBUG(<n>) 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 files changed, 5 insertions(+), 5 deletions(-)


diff --git a/src/src/drtables.c b/src/src/drtables.c
index 563670a..f0c131d 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);