[dovecot-cvs] dovecot/src/plugins/convert convert-storage.c, 1.8, 1.9

tss at dovecot.org tss at dovecot.org
Sat Nov 25 22:18:35 UTC 2006


Update of /var/lib/cvs/dovecot/src/plugins/convert
In directory talvi:/tmp/cvs-serv28938/plugins/convert

Modified Files:
	convert-storage.c 
Log Message:
Mailbox list indexing and related changes. Currently works only with
maildir and mmap_disable=no. This allows doing STATUS to synced mailboxes
without opening their index files at all.



Index: convert-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/plugins/convert/convert-storage.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- convert-storage.c	16 Nov 2006 00:17:16 -0000	1.8
+++ convert-storage.c	25 Nov 2006 22:18:33 -0000	1.9
@@ -27,12 +27,11 @@
 {
 	struct mailbox_sync_context *ctx;
         struct mailbox_sync_rec sync_rec;
-	struct mailbox_status status;
 
 	ctx = mailbox_sync_init(box, MAILBOX_SYNC_FLAG_FULL_READ);
 	while (mailbox_sync_next(ctx, &sync_rec) > 0)
 		;
-	return mailbox_sync_deinit(&ctx, &status);
+	return mailbox_sync_deinit(&ctx, 0, NULL);
 }
 
 static int mailbox_copy_mails(struct mailbox *srcbox, struct mailbox *destbox,
@@ -107,7 +106,7 @@
 	struct mailbox *srcbox, *destbox;
 	int ret = 0;
 
-	if ((info->flags & (MAILBOX_NONEXISTENT|MAILBOX_PLACEHOLDER)) != 0)
+	if ((info->flags & MAILBOX_NONEXISTENT) != 0)
 		return 0;
 
 	name = strcasecmp(info->name, "INBOX") == 0 ? "INBOX" : info->name;
@@ -163,7 +162,7 @@
 	int ret = 0;
 
 	iter = mailbox_list_iter_init(mail_storage_get_list(source_storage),
-				      "", "*", MAILBOX_LIST_ITER_FAST_FLAGS);
+				      "*", MAILBOX_LIST_ITER_FAST_FLAGS);
 	while ((info = mailbox_list_iter_next(iter)) != NULL) {
 		if (mailbox_convert_list_item(source_storage, dest_storage,
 					      info, dotlock) < 0) {
@@ -190,7 +189,7 @@
 
 	dest_list = mail_storage_get_list(dest_storage);
 	iter = mailbox_list_iter_init(mail_storage_get_list(source_storage),
-				      "", "*", MAILBOX_LIST_ITER_SUBSCRIBED |
+				      "*", MAILBOX_LIST_ITER_SUBSCRIBED |
 				      MAILBOX_LIST_ITER_FAST_FLAGS);
 	while ((info = mailbox_list_iter_next(iter)) != NULL) {
 		if (mailbox_list_set_subscribed(dest_list, info->name,



More information about the dovecot-cvs mailing list