[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync-parse.c, 1.20, 1.21 mbox-sync-private.h, 1.25, 1.26 mbox-sync-rewrite.c, 1.26, 1.27

cras at dovecot.org cras at dovecot.org
Sat Jul 31 03:33:56 EEST 2004


Update of /home/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv25219/lib-storage/index/mbox

Modified Files:
	mbox-sync-parse.c mbox-sync-private.h mbox-sync-rewrite.c 
Log Message:
Added struct message_header_line.middle and middle_len to contain the ':'
in header and whitespace around it.



Index: mbox-sync-parse.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync-parse.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- mbox-sync-parse.c	2 Jul 2004 12:45:53 -0000	1.20
+++ mbox-sync-parse.c	31 Jul 2004 00:33:53 -0000	1.21
@@ -388,21 +388,7 @@
 		if (!hdr->continued) {
 			line_start_pos = str_len(ctx->header);
 			str_append(ctx->header, hdr->name);
-			str_append(ctx->header, ": ");
-
-			if (ctx->header_first_change == (size_t)-1 &&
-			    hdr->full_value_offset - hdr->name_offset !=
-			    str_len(ctx->header) - line_start_pos) {
-				/* whitespaces around ':' are non-standard.
-				   either there's whitespace before ':' or none
-				   after. if we're going to rewrite this
-				   message, we can't do it partially from here
-				   after as offsets won't match. this shouldn't
-				   happen pretty much ever, so don't try to
-				   optimize this - just rewrite the whole
-				   thing. */
-				ctx->no_partial_rewrite = TRUE;
-			}
+			str_append_n(ctx->header, hdr->middle, hdr->middle_len);
 		}
 
 		func = header_func_find(hdr->name);

Index: mbox-sync-private.h
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync-private.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- mbox-sync-private.h	30 Jul 2004 05:08:36 -0000	1.25
+++ mbox-sync-private.h	31 Jul 2004 00:33:53 -0000	1.26
@@ -69,7 +69,6 @@
 
 	unsigned int have_eoh:1;
 	unsigned int need_rewrite:1;
-	unsigned int no_partial_rewrite:1;
 	unsigned int seen_imapbase:1;
 	unsigned int pseudo:1;
 	unsigned int updated:1;

Index: mbox-sync-rewrite.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync-rewrite.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- mbox-sync-rewrite.c	30 Jul 2004 01:03:59 -0000	1.26
+++ mbox-sync-rewrite.c	31 Jul 2004 00:33:53 -0000	1.27
@@ -267,7 +267,7 @@
 		return 1;
 	}
 
-	if (move_diff != 0 || ctx->no_partial_rewrite) {
+	if (move_diff != 0) {
 		/* forget about partial write optimizations */
 		ctx->header_first_change = 0;
 		ctx->header_last_change = 0;



More information about the dovecot-cvs mailing list