[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-save.c, 1.73,
1.74
cras at dovecot.org
cras at dovecot.org
Thu Mar 24 22:17:02 EET 2005
Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv4329/lib-storage/index/mbox
Modified Files:
mbox-save.c
Log Message:
If want_mail = TRUE for mbox_save_init() and we sync the mbox, we'll have to
open a new view to get the next_uid or it might not be updated.
Index: mbox-save.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-save.c,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -d -r1.73 -r1.74
--- mbox-save.c 15 Mar 2005 19:01:53 -0000 1.73
+++ mbox-save.c 24 Mar 2005 20:17:00 -0000 1.74
@@ -184,12 +184,18 @@
{
struct mbox_save_context *ctx = t->save_ctx;
const struct mail_index_header *hdr;
+ struct mail_index_view *view;
- hdr = mail_index_get_header(t->ictx.trans_view);
+ /* open a new view to get the header. this is required if we just
+ synced the mailbox so we can get updated next_uid. */
+ view = mail_index_view_open(t->ictx.ibox->index);
+ hdr = mail_index_get_header(view);
ctx->next_uid = hdr->next_uid;
ctx->synced = TRUE;
t->mbox_modified = TRUE;
+
+ mail_index_view_close(view);
}
static void status_flags_append(string_t *str, enum mail_flags flags,
More information about the dovecot-cvs
mailing list