[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync-parse.c, 1.33, 1.34 mbox-sync-private.h, 1.40, 1.41 mbox-sync-rewrite.c, 1.40, 1.41 mbox-sync.c, 1.129, 1.130

cras at dovecot.org cras at dovecot.org
Wed Dec 15 21:24:13 EET 2004


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

Modified Files:
	mbox-sync-parse.c mbox-sync-private.h mbox-sync-rewrite.c 
	mbox-sync.c 
Log Message:
Removed X-UIDL header handling. It's not actually used.



Index: mbox-sync-parse.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync-parse.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- mbox-sync-parse.c	15 Dec 2004 18:43:40 -0000	1.33
+++ mbox-sync-parse.c	15 Dec 2004 19:24:11 -0000	1.34
@@ -244,21 +244,6 @@
 	return TRUE;
 }
 
-static int parse_x_uidl(struct mbox_sync_mail_context *ctx,
-			struct message_header_line *hdr)
-{
-	size_t i;
-
-	for (i = 0; i < hdr->full_value_len; i++) {
-		if (IS_LWSP_LF(hdr->full_value[i]))
-			break;
-	}
-
-	str_truncate(ctx->uidl, 0);
-	str_append_n(ctx->uidl, hdr->full_value, i);
-	return TRUE;
-}
-
 static int parse_content_length(struct mbox_sync_mail_context *ctx,
 				struct message_header_line *hdr)
 {
@@ -294,8 +279,7 @@
 	{ "X-IMAPbase", parse_x_imap_base },
 	{ "X-Keywords", parse_x_keywords },
 	{ "X-Status", parse_x_status },
-	{ "X-UID", parse_x_uid },
-	{ "X-UIDL", parse_x_uidl }
+	{ "X-UID", parse_x_uid }
 };
 #define HEADER_FUNCS_COUNT (sizeof(header_funcs) / sizeof(*header_funcs))
 

Index: mbox-sync-private.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync-private.h,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- mbox-sync-private.h	15 Dec 2004 18:43:40 -0000	1.40
+++ mbox-sync-private.h	15 Dec 2004 19:24:11 -0000	1.41
@@ -65,7 +65,7 @@
 	uoff_t hdr_offset, body_offset;
 
 	size_t header_first_change, header_last_change;
-	string_t *header, *uidl;
+	string_t *header;
 
 	unsigned char hdr_md5_sum[16];
 
@@ -95,7 +95,7 @@
 	struct mail_index_transaction *t;
 	const struct mail_index_header *hdr;
 
-	string_t *header, *uidl, *from_line;
+	string_t *header, *from_line;
 
 	/* header state: */
 	uint32_t base_uid_validity, base_uid_last;

Index: mbox-sync-rewrite.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync-rewrite.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- mbox-sync-rewrite.c	7 Dec 2004 20:26:00 -0000	1.40
+++ mbox-sync-rewrite.c	15 Dec 2004 19:24:11 -0000	1.41
@@ -302,8 +302,6 @@
 	mail_ctx.sync_ctx = sync_ctx;
 	mail_ctx.seq = seq;
 	mail_ctx.header = sync_ctx->header;
-	mail_ctx.uidl = sync_ctx->uidl;
-	str_truncate(mail_ctx.uidl, 0);
 
 	hdr_offset = istream_raw_mbox_get_header_offset(sync_ctx->input);
 	mail_ctx.mail.offset = hdr_offset;

Index: mbox-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync.c,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -d -r1.129 -r1.130
--- mbox-sync.c	15 Dec 2004 17:02:00 -0000	1.129
+++ mbox-sync.c	15 Dec 2004 19:24:11 -0000	1.130
@@ -95,8 +95,6 @@
 	mail_ctx->sync_ctx = sync_ctx;
 	mail_ctx->seq = ++sync_ctx->seq;
 	mail_ctx->header = sync_ctx->header;
-	mail_ctx->uidl = sync_ctx->uidl;
-	str_truncate(mail_ctx->uidl, 0);
 
 	mail_ctx->mail.from_offset =
 		istream_raw_mbox_get_start_offset(sync_ctx->input);
@@ -354,13 +352,6 @@
 					      sync_ctx->ibox->md5hdr_ext_idx,
 					      mail_ctx->hdr_md5_sum, NULL);
 		}
-
-		if (str_len(mail_ctx->uidl) > 0) {
-			/*FIXME:mail_cache_add(sync_ctx->cache_trans,
-				       MAIL_CACHE_UID_STRING,
-				       str_data(mail_ctx->uidl),
-				       str_len(mail_ctx->uidl));*/
-		}
 	} else {
 		/* see if flags changed */
 		idx_flags = rec->flags;
@@ -1342,7 +1333,6 @@
 	sync_ctx.hdr = mail_index_get_header(sync_view);
 	sync_ctx.from_line = str_new(default_pool, 256);
 	sync_ctx.header = str_new(default_pool, 4096);
-	sync_ctx.uidl = str_new(default_pool, 128);
 
 	sync_ctx.index_sync_ctx = index_sync_ctx;
 	sync_ctx.sync_view = sync_view;
@@ -1442,7 +1432,6 @@
 			ret = -1;
 	}
 
-	str_free(sync_ctx.uidl);
 	str_free(sync_ctx.header);
 	str_free(sync_ctx.from_line);
 	buffer_free(sync_ctx.mails);



More information about the dovecot-cvs mailing list