[dovecot-cvs] dovecot/src/lib-storage/index index-storage.c, 1.48,
1.49 index-sync.c, 1.31, 1.32
cras at procontrol.fi
cras at procontrol.fi
Sat May 22 03:48:47 EEST 2004
- Previous message: [dovecot-cvs] dovecot/src/lib-index mail-index-sync-private.h, 1.4,
1.5 mail-index-sync-update.c, 1.13, 1.14 mail-index-sync.c,
1.14, 1.15 mail-index-transaction.c, 1.4,
1.5 mail-index-view-sync.c, 1.7, 1.8 mail-index.h, 1.107,
1.108 mail-transaction-log-view.c, 1.10,
1.11 mail-transaction-log.c, 1.27, 1.28 mail-transaction-log.h,
1.8, 1.9 mail-transaction-util.c, 1.6,
1.7 mail-transaction-util.h, 1.2, 1.3
- Next message: [dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-sync.c,
1.15, 1.16
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/dovecot/src/lib-storage/index
In directory talvi:/tmp/cvs-serv23470/lib-storage/index
Modified Files:
index-storage.c index-sync.c
Log Message:
Transaction log contains only UIDs now, no more sequences which just mess up
everything.
Index: index-storage.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/index-storage.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- a/index-storage.c 6 May 2004 01:22:25 -0000 1.48
+++ b/index-storage.c 22 May 2004 00:48:45 -0000 1.49
@@ -448,27 +448,3 @@
return mail_storage_set_index_error(ibox);
}*/
}
-
-unsigned int index_storage_get_recent_count(struct mail_index_view *view)
-{
-#if 0
- struct mail_index_header *hdr;
- struct mail_index_record *rec;
- unsigned int seq;
-
- hdr = mail_index_get_header(view);
- if (index->first_recent_uid <= 1) {
- /* all are recent */
- return hdr->messages_count;
- }
-
- /* get the first recent message */
- if (index->first_recent_uid >= hdr->next_uid)
- return 0;
-
- rec = mail_index_lookup_uid_range(view, index->first_recent_uid,
- hdr->next_uid - 1, &seq);
- return rec == NULL ? 0 : hdr->messages_count+1 - seq;
-#endif
- return 0;
-}
Index: index-sync.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/index-sync.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- a/index-sync.c 9 May 2004 23:06:27 -0000 1.31
+++ b/index-sync.c 22 May 2004 00:48:45 -0000 1.32
@@ -15,7 +15,7 @@
size_t i, expunges_count;
void *sc_context;
enum mail_index_sync_type sync_mask;
- uint32_t seq, messages_count, recent_count;
+ uint32_t seq, seq1, seq2, messages_count, recent_count;
int ret, appends;
sync_mask = MAIL_INDEX_SYNC_MASK_ALL;
@@ -54,11 +54,18 @@
if (sc->update_flags == NULL)
break;
- if (sync.seq2 > messages_count)
- sync.seq2 = messages_count;
+ if (mail_index_lookup_uid_range(ibox->view,
+ sync.uid1, sync.uid2,
+ &seq1, &seq2) < 0) {
+ ret = -1;
+ break;
+ }
+
+ if (seq1 == 0)
+ break;
/* FIXME: hide the flag updates for expunged messages */
- for (seq = sync.seq1; seq <= sync.seq2; seq++) {
+ for (seq = seq1; seq <= seq2; seq++) {
if (mail_index_lookup(ibox->view,
seq, &rec) < 0) {
ret = -1;
@@ -76,6 +83,7 @@
mail_storage_set_index_error(ibox);
if (sc->expunge != NULL) {
+ // FIXME: these are UIDs now..
for (i = expunges_count*2; i > 0; i -= 2) {
seq = expunges[i-1];
if (seq > messages_count)
- Previous message: [dovecot-cvs] dovecot/src/lib-index mail-index-sync-private.h, 1.4,
1.5 mail-index-sync-update.c, 1.13, 1.14 mail-index-sync.c,
1.14, 1.15 mail-index-transaction.c, 1.4,
1.5 mail-index-view-sync.c, 1.7, 1.8 mail-index.h, 1.107,
1.108 mail-transaction-log-view.c, 1.10,
1.11 mail-transaction-log.c, 1.27, 1.28 mail-transaction-log.h,
1.8, 1.9 mail-transaction-util.c, 1.6,
1.7 mail-transaction-util.h, 1.2, 1.3
- Next message: [dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-sync.c,
1.15, 1.16
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list