[dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-sync.c,
1.45, 1.46
cras at dovecot.org
cras at dovecot.org
Wed Nov 24 22:40:43 EET 2004
Update of /var/lib/cvs/dovecot/src/lib-storage/index/maildir
In directory talvi:/tmp/cvs-serv9391/lib-storage/index/maildir
Modified Files:
maildir-sync.c
Log Message:
mail_index_refresh() isn't public anymore, mail_index_view_open_locked()
works better for the purpose.
Index: maildir-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-sync.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- maildir-sync.c 24 Nov 2004 18:39:58 -0000 1.45
+++ maildir-sync.c 24 Nov 2004 20:40:41 -0000 1.46
@@ -532,21 +532,19 @@
}
cur_mtime = st.st_mtime;
- if (ibox->dirty_cur_time == 0) {
- /* cur stamp is kept in index, we don't have to sync if
- someone else has done it and updated the index. make sure
- we have a fresh index with latest sync_stamp. */
+ /* cur stamp is kept in index, we don't have to sync if
+ someone else has done it and updated the index. */
+ ibox->last_cur_mtime = mail_index_get_header(ibox->view)->sync_stamp;
+ if (ibox->dirty_cur_time == 0 && cur_mtime != ibox->last_cur_mtime) {
+ /* check if the index has been updated.. */
struct mail_index_view *view;
- const struct mail_index_header *hdr;
- if (mail_index_refresh(ibox->index) < 0) {
+ if (mail_index_view_open_locked(ibox->index, &view) < 0) {
mail_storage_set_index_error(ibox);
return -1;
}
- view = mail_index_view_open(ibox->index);
- hdr = mail_index_get_header(view);
- ibox->last_cur_mtime = hdr->sync_stamp;
+ ibox->last_cur_mtime = mail_index_get_header(view)->sync_stamp;
mail_index_view_close(view);
}
More information about the dovecot-cvs
mailing list