dovecot-2.0-sslstream: expire-tool: Don't crash at startup.

dovecot at dovecot.org dovecot at dovecot.org
Sat Feb 13 02:57:23 EET 2010


details:   http://hg.dovecot.org/dovecot-2.0-sslstream/rev/40abbeaa7a12
changeset: 10553:40abbeaa7a12
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Jan 06 15:25:52 2010 +0200
description:
expire-tool: Don't crash at startup.

diffstat:

1 file changed, 5 insertions(+)
src/plugins/expire/expire-tool.c |    5 +++++

diffs (22 lines):

diff -r 2882650531e0 -r 40abbeaa7a12 src/plugins/expire/expire-tool.c
--- a/src/plugins/expire/expire-tool.c	Sat Jan 02 12:01:09 2010 -0500
+++ b/src/plugins/expire/expire-tool.c	Wed Jan 06 15:25:52 2010 +0200
@@ -194,6 +194,7 @@ static void expire_run(struct master_ser
 	struct expire_context ctx;
 	struct dict *dict = NULL;
 	const struct mail_user_settings *user_set;
+	struct mail_storage_service_input input;
 	void **sets;
 	struct dict_transaction_context *trans;
 	struct dict_iterate_context *iter;
@@ -205,6 +206,10 @@ static void expire_run(struct master_ser
 	memset(&ctx, 0, sizeof(ctx));
 	ctx.storage_service = mail_storage_service_init(service, NULL,
 				MAIL_STORAGE_SERVICE_FLAG_USERDB_LOOKUP);
+
+	memset(&input, 0, sizeof(input));
+	input.module = input.service = "expire-tool";
+	mail_storage_service_init_settings(ctx.storage_service, &input);
 
 	sets = master_service_settings_get_others(service);
 	user_set = sets[0];


More information about the dovecot-cvs mailing list