]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
expire-plugin: code cleanup
authorBaofeng <baofeng.wang@dovecot.com>
Mon, 18 Apr 2016 12:40:56 +0000 (15:40 +0300)
committerGitLab <gitlab@git.dovecot.net>
Wed, 20 Apr 2016 13:10:49 +0000 (16:10 +0300)
expire_mail_namespaces_created() will check dict_uri after namespace
validation check.

src/plugins/expire/expire-plugin.c

index 6af2b9687b6fc4fb74ea0d88576887c9b22aa5c4..4119154f1a957acfbc628cce4c9da988178e2e5c 100644 (file)
@@ -405,17 +405,17 @@ static void expire_mail_namespaces_created(struct mail_namespace *ns)
        struct dict *db;
        const char *dict_uri, *error;
 
-       dict_uri = mail_user_plugin_getenv(user, "expire_dict");
        if (mail_user_plugin_getenv(user, "expire") == NULL) {
                if (user->mail_debug)
                        i_debug("expire: No expire setting - plugin disabled");
                return;
        }
+
+       dict_uri = mail_user_plugin_getenv(user, "expire_dict");
        if (dict_uri == NULL) {
                i_error("expire plugin: expire_dict setting missing");
                return;
        }
-
        /* we're using only shared dictionary, the username doesn't matter. */
        if (dict_init(dict_uri, DICT_DATA_TYPE_UINT32, "",
                      user->set->base_dir, &db, &error) < 0) {