[dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-sync.c,
1.48, 1.49
cras at dovecot.org
cras at dovecot.org
Mon Jan 10 18:14:44 EET 2005
Update of /var/lib/cvs/dovecot/src/lib-storage/index/maildir
In directory talvi:/tmp/cvs-serv7583
Modified Files:
maildir-sync.c
Log Message:
don't allocate memory from data stack uselessly.
Index: maildir-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-sync.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- maildir-sync.c 26 Dec 2004 09:12:43 -0000 1.48
+++ maildir-sync.c 10 Jan 2005 16:14:41 -0000 1.49
@@ -600,6 +600,7 @@
struct mail_index_transaction *trans;
const struct mail_index_header *hdr;
const struct mail_index_record *rec;
+ pool_t keyword_pool;
uint32_t seq, uid;
enum maildir_uidlist_rec_flag uflags;
const char *filename;
@@ -625,11 +626,13 @@
trans = mail_index_transaction_begin(view, FALSE, TRUE);
sync_ctx->trans = trans;
+ keyword_pool = pool_alloconly_create("maildir keywords", 128);
+
seq = 0;
iter = maildir_uidlist_iter_init(ibox->uidlist);
while (maildir_uidlist_iter_next(iter, &uid, &uflags, &filename)) {
- // FIXME: t_push..
- maildir_filename_get_flags(filename, pool_datastack_create(),
+ p_clear(keyword_pool);
+ maildir_filename_get_flags(filename, keyword_pool,
&flags, &keywords);
if ((uflags & MAILDIR_UIDLIST_REC_FLAG_RECENT) != 0 &&
@@ -767,6 +770,7 @@
// FIXME: update keywords
}
maildir_uidlist_iter_deinit(iter);
+ pool_unref(keyword_pool);
if (!partial) {
/* expunge the rest */
More information about the dovecot-cvs
mailing list