[dovecot-cvs] dovecot/src/lib-storage/index/dbox dbox-file.c, 1.11,
1.12 dbox-mail.c, 1.6, 1.7 dbox-uidlist.c, 1.21, 1.22
cras at dovecot.org
cras at dovecot.org
Wed Apr 12 22:25:04 EEST 2006
Update of /var/lib/cvs/dovecot/src/lib-storage/index/dbox
In directory talvi:/tmp/cvs-serv30355
Modified Files:
dbox-file.c dbox-mail.c dbox-uidlist.c
Log Message:
dbox fixes
Index: dbox-file.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/dbox/dbox-file.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- dbox-file.c 31 Mar 2006 21:21:19 -0000 1.11
+++ dbox-file.c 12 Apr 2006 19:24:57 -0000 1.12
@@ -137,6 +137,9 @@
if (dbox_file_read_header(mbox, mbox->file) < 0)
return -1;
+ } else {
+ /* make sure we're not caching outdated data */
+ i_stream_sync(mbox->file->input);
}
if (offset == 0)
Index: dbox-mail.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/dbox/dbox-mail.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- dbox-mail.c 24 Feb 2006 16:06:51 -0000 1.6
+++ dbox-mail.c 12 Apr 2006 19:24:57 -0000 1.7
@@ -31,11 +31,8 @@
return -1;
}
- if (hdr->expunged == '1') {
- mail->mail.mail.expunged = TRUE;
- return 0;
- }
-
+ /* Note that the mail may already have an expunge flag, but we don't
+ care since we can still read it */
mail->data.physical_size = mail->data.virtual_size =
hex2dec(hdr->mail_size_hex, sizeof(hdr->mail_size_hex));
mail->data.received_date =
@@ -119,8 +116,10 @@
}
mail_storage_set_critical(STORAGE(mbox->storage),
- "Cached message offset broken for seq %u in "
- "dbox file %s", seq, mbox->path);
+ "Cached message offset (%u, %"PRIuUOFF_T") "
+ "broken for uid %u in dbox file %s",
+ file_seq, offset, mail->mail.mail.uid,
+ mbox->path);
return -1;
}
Index: dbox-uidlist.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/dbox/dbox-uidlist.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- dbox-uidlist.c 9 Apr 2006 15:50:26 -0000 1.21
+++ dbox-uidlist.c 12 Apr 2006 19:24:59 -0000 1.22
@@ -546,8 +546,8 @@
range[ui].seq1, range[ui].seq2);
}
}
- str_printfa(str, " %u %s %"PRIuUOFF_T, entries[i]->file_seq,
- dec2str(entries[i]->create_time),
+ str_printfa(str, " %u %lu %"PRIuUOFF_T, entries[i]->file_seq,
+ (unsigned long)entries[i]->create_time,
entries[i]->file_size);
str_append_c(str, '\n');
if (o_stream_send(output, str_data(str), str_len(str)) < 0)
More information about the dovecot-cvs
mailing list