# HG changeset patch # User Aki Tuomi # Date 1489649939 -7200 # Node ID 4a203e1b63897c76cee71e728e9da9607992ba73 # Parent 0a4ca3f1f285eca9941f961e21a1d71578368531 trash: Move config file to trash user Makes static analyser happy diff -r 0a4ca3f1f285 -r 4a203e1b6389 src/plugins/trash/trash-plugin.c --- a/src/plugins/trash/trash-plugin.c Sun Mar 05 19:45:04 2017 +0100 +++ b/src/plugins/trash/trash-plugin.c Thu Mar 16 09:38:59 2017 +0200 @@ -35,6 +35,7 @@ struct trash_user { union mail_user_module_context module_ctx; + const char *config_file; /* ordered by priority, highest first */ ARRAY(struct trash_mailbox) trash_boxes; }; @@ -347,6 +348,7 @@ i_error("trash plugin: quota plugin not initialized"); } else { tuser = p_new(user->pool, struct trash_user, 1); + tuser->config_file = env; MODULE_CONTEXT_SET(user, trash_user_module, tuser); } } @@ -357,9 +359,8 @@ struct mail_user *user = namespaces->user; struct trash_user *tuser = TRASH_USER_CONTEXT(user); struct quota_user *quser = QUOTA_USER_CONTEXT(user); - const char *env = mail_user_plugin_getenv(user, "trash"); - if (tuser != NULL && read_configuration(user, env) == 0) { + if (tuser != NULL && read_configuration(user, tuser->config_file) == 0) { trash_next_quota_test_alloc = quser->quota->set->test_alloc; quser->quota->set->test_alloc = trash_quota_test_alloc;