Mercurial > dovecot > original-hg > dovecot-1.2
diff src/plugins/mbox-snarf/mbox-snarf-plugin.c @ 6463:aeee5076f99f HEAD
Use mailbox_sync() instead of our own implementation.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 22 Sep 2007 16:21:20 +0300 |
parents | 47c3c4d41b26 |
children | 1a3604c8ee05 |
line wrap: on
line diff
--- a/src/plugins/mbox-snarf/mbox-snarf-plugin.c Sat Sep 22 16:21:09 2007 +0300 +++ b/src/plugins/mbox-snarf/mbox-snarf-plugin.c Sat Sep 22 16:21:20 2007 +0300 @@ -35,17 +35,6 @@ static MODULE_CONTEXT_DEFINE_INIT(mbox_snarf_storage_module, &mail_storage_module_register); -static int sync_mailbox(struct mailbox *box) -{ - struct mailbox_sync_context *ctx; - struct mailbox_sync_rec sync_rec; - - ctx = mailbox_sync_init(box, MAILBOX_SYNC_FLAG_FULL_READ); - while (mailbox_sync_next(ctx, &sync_rec)) - ; - return mailbox_sync_deinit(&ctx, 0, NULL); -} - static int mbox_snarf(struct mailbox *srcbox, struct mailbox *destbox) { struct mail_search_arg search_arg; @@ -54,7 +43,7 @@ struct mail *mail; int ret; - if (sync_mailbox(srcbox) < 0) + if (mailbox_sync(srcbox, MAILBOX_SYNC_FLAG_FULL_READ, 0, NULL) < 0) return -1; memset(&search_arg, 0, sizeof(search_arg));