changeset 8243:9cabb706d3df HEAD

expire plugin: Fixes for using namespace prefixes.
author Timo Sirainen <tss@iki.fi>
date Sun, 05 Oct 2008 17:21:36 +0300
parents 7038df7f5d34
children 327c893590c3
files src/plugins/expire/expire-plugin.c src/plugins/expire/expire-tool.c
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugins/expire/expire-plugin.c	Sun Oct 05 17:12:11 2008 +0300
+++ b/src/plugins/expire/expire-plugin.c	Sun Oct 05 17:21:36 2008 +0300
@@ -99,7 +99,6 @@
 {
 	struct expire_mailbox *xpr_box = EXPIRE_CONTEXT(t->box);
 	struct expire_transaction_context *xt = EXPIRE_CONTEXT(t);
-	const char *mailbox_name = t->box->name;
 	time_t new_stamp;
 	bool update_dict = FALSE;
 	int ret;
@@ -123,7 +122,8 @@
 		const char *key, *value;
 
 		key = t_strconcat(DICT_EXPIRE_PREFIX, expire.username, "/",
-				  mailbox_name, NULL);
+				  t->box->storage->ns->prefix,
+				  t->box->name, NULL);
 		if (!xt->first_expunged && xt->saves) {
 			/* saved new mails. dict needs to be updated only if
 			   this is the first mail in the database */
--- a/src/plugins/expire/expire-tool.c	Sun Oct 05 17:12:11 2008 +0300
+++ b/src/plugins/expire/expire-tool.c	Sun Oct 05 17:21:36 2008 +0300
@@ -100,7 +100,7 @@
 		errstr = mail_storage_get_last_error(ns->storage, &error);
 		if (error != MAIL_ERROR_NOTFOUND) {
 			i_error("%s: Opening mailbox %s failed: %s",
-				user, ns_mailbox, errstr);
+				user, mailbox, errstr);
 			return -1;
 		}