[dovecot-cvs] dovecot/src/pop3 main.c,1.48.2.4,1.48.2.5
tss at dovecot.org
tss at dovecot.org
Thu Feb 22 14:36:02 UTC 2007
Update of /var/lib/cvs/dovecot/src/pop3
In directory talvi:/tmp/cvs-serv15806/pop3
Modified Files:
Tag: branch_1_0
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.48.2.4
retrieving revision 1.48.2.5
diff -u -d -r1.48.2.4 -r1.48.2.5
--- main.c 16 Feb 2007 13:12:04 -0000 1.48.2.4
+++ main.c 22 Feb 2007 14:36:00 -0000 1.48.2.5
@@ -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 mail_storage_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