Mercurial > dovecot > original-hg > dovecot-1.2
changeset 8112:d630b13ccd60 HEAD
Expire plugin: Include expire/ in the dictionary path.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 27 Aug 2008 12:08:14 +0300 |
parents | d49bdda63506 |
children | 2d3e942a4cde |
files | src/plugins/expire/expire-env.h src/plugins/expire/expire-plugin.c src/plugins/expire/expire-tool.c |
diffstat | 3 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/plugins/expire/expire-env.h Wed Aug 27 10:13:58 2008 +0300 +++ b/src/plugins/expire/expire-env.h Wed Aug 27 12:08:14 2008 +0300 @@ -1,6 +1,8 @@ #ifndef EXPIRE_ENV_H #define EXPIRE_ENV_H +#define DICT_EXPIRE_PREFIX DICT_PATH_SHARED"expire/" + struct expire_env; struct expire_env *expire_env_init(const char *expunges, const char *altmoves);
--- a/src/plugins/expire/expire-plugin.c Wed Aug 27 10:13:58 2008 +0300 +++ b/src/plugins/expire/expire-plugin.c Wed Aug 27 12:08:14 2008 +0300 @@ -122,7 +122,7 @@ if (xt->first_expunged || xt->saves) T_BEGIN { const char *key, *value; - key = t_strconcat(DICT_PATH_SHARED, expire.username, "/", + key = t_strconcat(DICT_EXPIRE_PREFIX, expire.username, "/", mailbox_name, NULL); if (!xt->first_expunged && xt->saves) { /* saved new mails. dict needs to be updated only if
--- a/src/plugins/expire/expire-tool.c Wed Aug 27 10:13:58 2008 +0300 +++ b/src/plugins/expire/expire-tool.c Wed Aug 27 12:08:14 2008 +0300 @@ -208,14 +208,14 @@ i_fatal("dict_init() failed"); trans = dict_transaction_begin(dict); - iter = dict_iterate_init(dict, DICT_PATH_SHARED, + iter = dict_iterate_init(dict, DICT_EXPIRE_PREFIX, DICT_ITERATE_FLAG_RECURSE | DICT_ITERATE_FLAG_SORT_BY_VALUE); /* We'll get the oldest values (timestamps) first */ while (dict_iterate(iter, &key, &value) > 0) { - /* key = DICT_PATH_SHARED<user>/<mailbox> */ - userp = key + strlen(DICT_PATH_SHARED); + /* key = DICT_EXPIRE_PREFIX<user>/<mailbox> */ + userp = key + strlen(DICT_EXPIRE_PREFIX); p = strchr(userp, '/'); if (p == NULL) {