dovecot-1.2: Expire plugin: Include expire/ in the dictionary path.

dovecot at dovecot.org dovecot at dovecot.org
Wed Aug 27 12:10:26 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.2/rev/d630b13ccd60
changeset: 8112:d630b13ccd60
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Aug 27 12:08:14 2008 +0300
description:
Expire plugin: Include expire/ in the dictionary path.

diffstat:

3 files changed, 6 insertions(+), 4 deletions(-)
src/plugins/expire/expire-env.h    |    2 ++
src/plugins/expire/expire-plugin.c |    2 +-
src/plugins/expire/expire-tool.c   |    6 +++---

diffs (44 lines):

diff -r d49bdda63506 -r d630b13ccd60 src/plugins/expire/expire-env.h
--- 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,5 +1,7 @@
 #ifndef EXPIRE_ENV_H
 #define EXPIRE_ENV_H
+
+#define DICT_EXPIRE_PREFIX DICT_PATH_SHARED"expire/"
 
 struct expire_env;
 
diff -r d49bdda63506 -r d630b13ccd60 src/plugins/expire/expire-plugin.c
--- 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 @@ expire_mailbox_transaction_commit(struct
 	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
diff -r d49bdda63506 -r d630b13ccd60 src/plugins/expire/expire-tool.c
--- 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 @@ static void expire_run(bool testrun)
 		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) {


More information about the dovecot-cvs mailing list