[dovecot-cvs] dovecot/src/pop3 Makefile.am,1.7,1.8 main.c,1.5,1.6

cras at procontrol.fi cras at procontrol.fi
Wed May 14 22:23:07 EEST 2003


Update of /home/cvs/dovecot/src/pop3
In directory danu:/tmp/cvs-serv27511/src/pop3

Modified Files:
	Makefile.am main.c 
Log Message:
Added support for dynamically loadable imap/pop3 modules.



Index: Makefile.am
===================================================================
RCS file: /home/cvs/dovecot/src/pop3/Makefile.am,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- Makefile.am	12 May 2003 06:13:38 -0000	1.7
+++ Makefile.am	14 May 2003 18:23:05 -0000	1.8
@@ -8,7 +8,7 @@
 	-I$(top_srcdir)/src/lib-imap \
 	-I$(top_srcdir)/src/lib-storage
 
-pop3_LDADD = \
+libs = \
 	../lib-storage/register/libstorage-register.a \
 	$(STORAGE_LIBS) \
 	../lib-storage/libstorage.a \
@@ -16,10 +16,14 @@
 	../lib-imap/libimap.a \
 	../lib-mail/libmail.a \
 	../lib-charset/libcharset.a \
-	../lib/liblib.a \
-	$(LIBICONV)
+	../lib/liblib.a
 
-pop3_DEPENDENCIES = $(pop3_LDADD)
+pop3_LDADD = \
+	$(libs) \
+	$(LIBICONV) \
+	$(MODULE_LIBS)
+
+pop3_DEPENDENCIES = $(libs)
 
 pop3_SOURCES = \
 	client.c \

Index: main.c
===================================================================
RCS file: /home/cvs/dovecot/src/pop3/main.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- main.c	16 Apr 2003 14:30:58 -0000	1.5
+++ main.c	14 May 2003 18:23:05 -0000	1.6
@@ -6,6 +6,7 @@
 #include "restrict-access.h"
 #include "fd-close-on-exec.h"
 #include "process-title.h"
+#include "module-dir.h"
 #include "mail-storage.h"
 
 #include <stdlib.h>
@@ -15,6 +16,8 @@
         (getenv("LOGGED_IN") == NULL)
 
 struct ioloop *ioloop;
+
+static struct module *modules;
 static char log_prefix[128]; /* syslog() needs this to be permanent */
 
 static void sig_quit(int signo __attr_unused__)
@@ -69,6 +72,9 @@
 	mail_storage_register_all();
 	clients_init();
 
+	modules = getenv("MODULE_DIR") == NULL ? NULL :
+		module_dir_load(getenv("MODULE_DIR"));
+
 	mail = getenv("MAIL");
 	if (mail == NULL) {
 		/* support also maildir-specific environment */
@@ -102,6 +108,8 @@
 	   which is too common at least while testing :) */
 	if (lib_signal_kill != 0 && lib_signal_kill != 2)
 		i_warning("Killed with signal %d", lib_signal_kill);
+
+	module_dir_unload(modules);
 
 	clients_deinit();
         mail_storage_deinit();



More information about the dovecot-cvs mailing list