[dovecot-cvs] dovecot/src/pop3 main.c,1.57,1.58

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


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

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/pop3/main.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- main.c	16 Feb 2007 13:12:16 -0000	1.57
+++ main.c	22 Feb 2007 14:36:08 -0000	1.58
@@ -145,6 +145,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, pop3 is v"PACKAGE_VERSION" "
+			"(if you don't care, set version_ignore=yes)", version);
+	}
+
 	/* Log file or syslog opening probably requires roots */
 	open_logfile();
 
@@ -159,7 +168,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());
@@ -170,14 +179,7 @@
         enum mail_storage_flags flags;
         enum file_lock_method lock_method;
 	struct mail_storage *storage;
-	const char *mail, *value;
-
-	value = getenv("DOVECOT_VERSION");
-	if (value != NULL && strcmp(value, PACKAGE_VERSION) != 0) {
-		i_fatal("Dovecot version mismatch: "
-			"Master is v%s, pop3 is v"PACKAGE_VERSION" "
-			"(if you don't care, set version_ignore=yes)", value);
-	}
+	const char *mail;
 
 	lib_signals_init();
         lib_signals_set_handler(SIGINT, TRUE, sig_die, NULL);



More information about the dovecot-cvs mailing list