[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync-private.h, 1.60, 1.61 mbox-sync-rewrite.c, 1.68, 1.69 mbox-sync-update.c, 1.51, 1.52

tss at dovecot.org tss at dovecot.org
Fri Feb 16 19:01:37 UTC 2007


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

Modified Files:
	mbox-sync-private.h mbox-sync-rewrite.c mbox-sync-update.c 
Log Message:
Fixed some wrong "uid-last unexpectedly lost" errors.



Index: mbox-sync-private.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync-private.h,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- mbox-sync-private.h	22 Jan 2007 12:44:15 -0000	1.60
+++ mbox-sync-private.h	16 Feb 2007 19:01:35 -0000	1.61
@@ -81,7 +81,7 @@
 	uoff_t content_length;
 
 	size_t hdr_pos[MBOX_HDR_COUNT];
-	uint32_t parsed_uid;
+	uint32_t parsed_uid, last_uid_updated_value;
 	unsigned int last_uid_value_start_pos;
 
 	unsigned int have_eoh:1;

Index: mbox-sync-rewrite.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync-rewrite.c,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -d -r1.68 -r1.69
--- mbox-sync-rewrite.c	22 Jan 2007 12:44:15 -0000	1.68
+++ mbox-sync-rewrite.c	16 Feb 2007 19:01:35 -0000	1.69
@@ -231,7 +231,7 @@
 	if (ctx->imapbase_updated) {
 		/* update so a) we don't try to update it later unneededly,
 		   b) if we do actually update it, we see the correct value */
-		ctx->sync_ctx->base_uid_last = ctx->sync_ctx->next_uid - 1;
+		ctx->sync_ctx->base_uid_last = ctx->last_uid_updated_value;
 	}
 }
 

Index: mbox-sync-update.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync-update.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- mbox-sync-update.c	22 Jan 2007 12:44:15 -0000	1.51
+++ mbox-sync-update.c	16 Feb 2007 19:01:35 -0000	1.52
@@ -201,10 +201,11 @@
 		str_printfa(ctx->header, "%u ",
 			    ctx->sync_ctx->base_uid_validity);
 
+		ctx->last_uid_updated_value = ctx->sync_ctx->next_uid-1;
 		ctx->last_uid_value_start_pos = str_len(ctx->header) -
 			ctx->hdr_pos[MBOX_HDR_X_IMAPBASE];
 		ctx->imapbase_updated = TRUE;
-		str_printfa(ctx->header, "%010u", ctx->sync_ctx->next_uid-1);
+		str_printfa(ctx->header, "%010u", ctx->last_uid_updated_value);
 
 		keywords_append_all(ctx, ctx->header);
 		str_append_c(ctx->header, '\n');
@@ -351,9 +352,10 @@
 	str = t_str_new(200);
 	str_printfa(str, "%u ", sync_ctx->base_uid_validity);
 
+	ctx->last_uid_updated_value = sync_ctx->next_uid-1;
 	ctx->last_uid_value_start_pos = str_len(str);
 	ctx->imapbase_updated = TRUE;
-	str_printfa(str, "%010u", sync_ctx->next_uid - 1);
+	str_printfa(str, "%010u", ctx->last_uid_updated_value);
 
 	keywords_append_all(ctx, str);
 	str_append_c(str, '\n');



More information about the dovecot-cvs mailing list