[dovecot-cvs] dovecot/src/lib-storage/index/dbox dbox-mail.c, 1.2, 1.3 dbox-uidlist.c, 1.8, 1.9

cras at dovecot.org cras at dovecot.org
Wed Jan 11 21:36:53 EET 2006


Update of /var/lib/cvs/dovecot/src/lib-storage/index/dbox
In directory talvi:/tmp/cvs-serv32412/src/lib-storage/index/dbox

Modified Files:
	dbox-mail.c dbox-uidlist.c 
Log Message:
Use CR+LF linefeeds always so that physical size = virtual size.



Index: dbox-mail.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/dbox/dbox-mail.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- dbox-mail.c	5 Jan 2006 01:23:28 -0000	1.2
+++ dbox-mail.c	11 Jan 2006 19:36:50 -0000	1.3
@@ -38,7 +38,7 @@
 		return 0;
 	}
 
-	mail->data.physical_size =
+	mail->data.physical_size = mail->data.virtual_size =
 		hex2dec(hdr->mail_size_hex, sizeof(hdr->mail_size_hex));
 	mail->data.received_date =
 		hex2dec(hdr->received_time_hex, sizeof(hdr->received_time_hex));
@@ -201,7 +201,7 @@
 	index_mail_get_parts,
 	dbox_mail_get_received_date,
 	index_mail_get_date,
-	index_mail_get_virtual_size,
+	dbox_mail_get_physical_size, /* physical = virtual in our case */
 	dbox_mail_get_physical_size,
 	index_mail_get_first_header,
 	index_mail_get_headers,

Index: dbox-uidlist.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/dbox/dbox-uidlist.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- dbox-uidlist.c	11 Jan 2006 19:26:05 -0000	1.8
+++ dbox-uidlist.c	11 Jan 2006 19:36:50 -0000	1.9
@@ -860,6 +860,7 @@
 	struct dbox_uidlist_entry *const *entries;
 	struct dbox_file *file;
 	struct dotlock *dotlock;
+	struct ostream *output;
 	string_t *str;
 	unsigned int i, count;
 	struct stat st;
@@ -949,7 +950,12 @@
 
 	file->input = i_stream_create_file(file->fd, default_pool,
 					   65536, FALSE);
-	file->output = o_stream_create_file(file->fd, default_pool, 0, FALSE);
+
+	/* we'll be using CRLF linefeeds always */
+	output = o_stream_create_file(file->fd, default_pool, 0, FALSE);
+	file->output = o_stream_create_crlf(default_pool, output);
+	o_stream_unref(output);
+
 	if (st.st_size < sizeof(struct dbox_file_header)) {
 		if (dbox_file_write_header(mbox, file) < 0) {
 			dbox_file_close(file);



More information about the dovecot-cvs mailing list