From ceb615da0308bf9a59e54fb12fe8e38cfd721c54 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 6 Aug 2010 17:21:27 +0100 Subject: [PATCH] module_dir_load(): If ignore_dlopen_errors and debug is set, still log a debug message about failure. --- src/lib/module-dir.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/module-dir.c b/src/lib/module-dir.c index e4c283631c..7121f4d53f 100644 --- a/src/lib/module-dir.c +++ b/src/lib/module-dir.c @@ -170,8 +170,14 @@ module_load(const char *path, const char *name, if (set->ignore_dlopen_errors) { handle = quiet_dlopen(path, RTLD_GLOBAL | RTLD_NOW); - if (handle == NULL) + if (handle == NULL) { + if (set->debug) { + i_debug("Skipping module %s, " + "because dlopen() failed: %s", + name, dlerror()); + } return NULL; + } } else { handle = dlopen(path, RTLD_GLOBAL | RTLD_NOW); if (handle == NULL) { -- 2.47.3