dovecot-1.3: imap: Initialize commands hash before plugins are i...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Apr 17 04:40:13 EEST 2009
details: http://hg.dovecot.org/dovecot-1.3/rev/9ff1e79fffab
changeset: 9126:9ff1e79fffab
user: Timo Sirainen <tss at iki.fi>
date: Thu Apr 16 21:37:37 2009 -0400
description:
imap: Initialize commands hash before plugins are initialized so they can register commands.
diffstat:
1 file changed, 5 insertions(+), 2 deletions(-)
src/imap/main.c | 7 +++++--
diffs (38 lines):
diff -r dc220ff69fb8 -r 9ff1e79fffab src/imap/main.c
--- a/src/imap/main.c Thu Apr 16 20:09:12 2009 -0400
+++ b/src/imap/main.c Thu Apr 16 21:37:37 2009 -0400
@@ -84,7 +84,6 @@ static void main_init(const struct imap_
}
clients_init();
- commands_init();
client = client_create(0, 1, user, set);
client->workarounds = parse_workarounds(set);
@@ -129,7 +128,6 @@ static void main_deinit(void)
if (log_io != NULL)
io_remove(&log_io);
clients_deinit();
- commands_deinit();
}
int main(int argc, char *argv[], char *envp[])
@@ -182,6 +180,9 @@ int main(int argc, char *argv[], char *e
i_fatal("USER environment missing");
}
+ /* plugins may want to add commands, so this needs to be called early */
+ commands_init();
+
mail_user = mail_storage_service_init_user(service, user, set_roots,
storage_service_flags);
set = mail_storage_service_get_settings(service);
@@ -199,6 +200,8 @@ int main(int argc, char *argv[], char *e
main_deinit();
mail_storage_service_deinit_user();
+ commands_deinit();
+
master_service_deinit(&service);
return 0;
}
More information about the dovecot-cvs
mailing list