[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync-private.h, 1.56.2.3, 1.56.2.4 mbox-sync-rewrite.c, 1.62.2.5, 1.62.2.6 mbox-sync-update.c, 1.46.2.2, 1.46.2.3

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


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

Modified Files:
      Tag: branch_1_0
	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.56.2.3
retrieving revision 1.56.2.4
diff -u -d -r1.56.2.3 -r1.56.2.4
--- mbox-sync-private.h	22 Jan 2007 12:44:11 -0000	1.56.2.3
+++ mbox-sync-private.h	16 Feb 2007 19:01:31 -0000	1.56.2.4
@@ -79,7 +79,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.62.2.5
retrieving revision 1.62.2.6
diff -u -d -r1.62.2.5 -r1.62.2.6
--- mbox-sync-rewrite.c	22 Jan 2007 12:44:11 -0000	1.62.2.5
+++ mbox-sync-rewrite.c	16 Feb 2007 19:01:31 -0000	1.62.2.6
@@ -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.46.2.2
retrieving revision 1.46.2.3
diff -u -d -r1.46.2.2 -r1.46.2.3
--- mbox-sync-update.c	22 Jan 2007 12:44:11 -0000	1.46.2.2
+++ mbox-sync-update.c	16 Feb 2007 19:01:31 -0000	1.46.2.3
@@ -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