[dovecot-cvs] dovecot/src/lib module-dir.c,1.7,1.8

cras at dovecot.org cras at dovecot.org
Sun Aug 14 22:40:31 EEST 2005


Update of /var/lib/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv11360

Modified Files:
	module-dir.c 
Log Message:
If DEBUG environment is set, module_load_dir() now prints some debugging



Index: module-dir.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/module-dir.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- module-dir.c	20 Jul 2004 12:45:13 -0000	1.7
+++ module-dir.c	14 Aug 2005 19:40:29 -0000	1.8
@@ -5,6 +5,7 @@
 
 #ifdef HAVE_MODULES
 
+#include <stdlib.h>
 #include <unistd.h>
 #include <dirent.h>
 #include <dlfcn.h>
@@ -86,6 +87,9 @@
 		return NULL;
 	}
 
+	if (getenv("DEBUG") != NULL)
+		i_info("Module loaded: %s", path);
+
 	if (init != NULL)
 		init();
 	return module;
@@ -98,6 +102,9 @@
 	const char *name, *path, *p;
 	struct module *modules, *module;
 
+	if (getenv("DEBUG") != NULL)
+		i_info("Loading modules from directory: %s", dir);
+
 	dirp = opendir(dir);
 	if (dirp == NULL) {
 		if (errno != ENOENT)



More information about the dovecot-cvs mailing list