[dovecot-cvs] dovecot/src/plugins/expire expire-plugin.c,1.5,1.6

tss at dovecot.org tss at dovecot.org
Tue Apr 17 21:00:50 EEST 2007


Update of /var/lib/cvs/dovecot/src/plugins/expire
In directory talvi:/tmp/cvs-serv2828/expire

Modified Files:
	expire-plugin.c 
Log Message:
Updated to support namespaces



Index: expire-plugin.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/plugins/expire/expire-plugin.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- expire-plugin.c	17 Apr 2007 16:40:59 -0000	1.5
+++ expire-plugin.c	17 Apr 2007 18:00:48 -0000	1.6
@@ -4,6 +4,7 @@
 #include "ioloop.h"
 #include "array.h"
 #include "dict.h"
+#include "mail-namespace.h"
 #include "index-mail.h"
 #include "index-storage.h"
 #include "expire-env.h"
@@ -284,10 +285,12 @@
 		EXPIRE_CONTEXT(storage);
 	struct mailbox *box;
 	const struct expire_box *expire_box;
+	const char *full_name;
 
 	box = xpr_storage->super.mailbox_open(storage, name, input, flags);
 	if (box != NULL) {
-		expire_box = expire_box_find(expire.env, name);
+		full_name = t_strconcat(storage->ns->prefix, name, NULL);
+		expire_box = expire_box_find(expire.env, full_name);
 		if (expire_box != NULL)
 			mailbox_expire_hook(box, expire_box->expire_secs);
 	}



More information about the dovecot-cvs mailing list