# HG changeset patch # User Timo Sirainen # Date 1262784352 -7200 # Node ID 40abbeaa7a124eea970dae7e1ed7b875ca0dc475 # Parent 2882650531e0d29db56b703bb5cbaed6fd284ad3 expire-tool: Don't crash at startup. 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 @@ 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; @@ -206,6 +207,10 @@ 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];