dovecot-2.2: lib: Small error logging improvements for module_di...

dovecot at dovecot.org dovecot at dovecot.org
Mon Mar 9 15:15:48 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/d978da323d44
changeset: 18314:d978da323d44
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Mar 09 17:15:03 2015 +0200
description:
lib: Small error logging improvements for module_dir_load()

diffstat:

 src/lib/module-dir.c |  17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)

diffs (48 lines):

diff -r 8cb9f50f5b40 -r d978da323d44 src/lib/module-dir.c
--- a/src/lib/module-dir.c	Mon Mar 09 17:14:35 2015 +0200
+++ b/src/lib/module-dir.c	Mon Mar 09 17:15:03 2015 +0200
@@ -129,9 +129,8 @@
 		}
 		if (m == NULL) {
 			errmsg = t_str_new(128);
-			str_printfa(errmsg, "Can't load plugin %s: "
-				    "Plugin %s must be loaded also",
-				    module->name, *deps);
+			str_printfa(errmsg, "Plugin %s must be loaded also",
+				    *deps);
 			if (set->setting_name != NULL) {
 				str_printfa(errmsg,
 					    " (you must set: %s=$%s %s)",
@@ -213,8 +212,8 @@
 	} else {
 		handle = dlopen(path, RTLD_GLOBAL | RTLD_NOW);
 		if (handle == NULL) {
-			*error_r = t_strdup_printf("dlopen(%s) failed: %s",
-						   path, dlerror());
+			*error_r = t_strdup_printf("dlopen() failed: %s",
+						   dlerror());
 #ifdef RTLD_LAZY
 			/* try to give a better error message by lazily loading
 			   the plugin and checking its dependencies */
@@ -237,8 +236,8 @@
 	if (module_version != NULL &&
 	    !versions_equal(*module_version, set->abi_version)) {
 		*error_r = t_strdup_printf(
-			"Module is for different ABI version %s (we have %s): %s",
-			*module_version, set->abi_version, path);
+			"Module is for different ABI version %s (we have %s)",
+			*module_version, set->abi_version);
 		module_free(module);
 		return -1;
 	}
@@ -254,8 +253,8 @@
 	if ((module->init == NULL || module->deinit == NULL) &&
 	    set->require_init_funcs) {
 		*error_r = t_strdup_printf(
-			"Module doesn't have %s function: %s",
-			module->init == NULL ? "init" : "deinit", path);
+			"Module doesn't have %s function",
+			module->init == NULL ? "init" : "deinit");
 	} else if (!module_check_wrong_binary_dependency(set, module, error_r)) {
 		/* failed */
 	} else if (!module_check_missing_plugin_dependencies(set, module,


More information about the dovecot-cvs mailing list