[dovecot-cvs] dovecot/src/imap main.c,1.86,1.87

tss at dovecot.org tss at dovecot.org
Thu Feb 22 14:36:09 UTC 2007


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

Modified Files:
	main.c 
Log Message:
Don't compare to PACKAGE_VERSION in lib/ core directly, rather make
module_dir_load() have the version string as parameter. Plugin version
checks can be skipped with version_ignore=yes.



Index: main.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/main.c,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -d -r1.86 -r1.87
--- main.c	16 Feb 2007 13:12:11 -0000	1.86
+++ main.c	22 Feb 2007 14:36:07 -0000	1.87
@@ -128,6 +128,15 @@
 
 static void drop_privileges(void)
 {
+	const char *version;
+
+	version = getenv("DOVECOT_VERSION");
+	if (version != NULL && strcmp(version, PACKAGE_VERSION) != 0) {
+		i_fatal("Dovecot version mismatch: "
+			"Master is v%s, imap is v"PACKAGE_VERSION" "
+			"(if you don't care, set version_ignore=yes)", version);
+	}
+
 	/* Log file or syslog opening probably requires roots */
 	open_logfile();
 
@@ -142,7 +151,7 @@
 		if (plugin_dir == NULL)
 			plugin_dir = MODULEDIR"/imap";
 		modules = module_dir_load(plugin_dir, getenv("MAIL_PLUGINS"),
-					  TRUE);
+					  TRUE, version);
 	}
 
 	restrict_access_by_env(!IS_STANDALONE());
@@ -153,13 +162,6 @@
 	struct client *client;
 	const char *user, *str;
 
-	str = getenv("DOVECOT_VERSION");
-	if (str != NULL && strcmp(str, PACKAGE_VERSION) != 0) {
-		i_fatal("Dovecot version mismatch: "
-			"Master is v%s, imap is v"PACKAGE_VERSION" "
-			"(if you don't care, set version_ignore=yes)", str);
-	}
-
 	lib_signals_init();
         lib_signals_set_handler(SIGINT, TRUE, sig_die, NULL);
         lib_signals_set_handler(SIGTERM, TRUE, sig_die, NULL);



More information about the dovecot-cvs mailing list