[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync-private.h, 1.28, 1.29 mbox-sync.c, 1.74, 1.75

cras at dovecot.org cras at dovecot.org
Thu Sep 2 18:51:47 EEST 2004


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

Modified Files:
	mbox-sync-private.h mbox-sync.c 
Log Message:
Wrong messages were set recent if another client had modified the mbox.



Index: mbox-sync-private.h
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync-private.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- mbox-sync-private.h	28 Aug 2004 17:41:52 -0000	1.28
+++ mbox-sync-private.h	2 Sep 2004 15:51:44 -0000	1.29
@@ -79,6 +79,7 @@
 	unsigned int seen_imapbase:1;
 	unsigned int pseudo:1;
 	unsigned int updated:1;
+	unsigned int recent:1;
 	unsigned int seen_received_hdr:1;
 };
 

Index: mbox-sync.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync.c,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -d -r1.74 -r1.75
--- mbox-sync.c	29 Aug 2004 07:54:55 -0000	1.74
+++ mbox-sync.c	2 Sep 2004 15:51:44 -0000	1.75
@@ -150,8 +150,7 @@
 			/* need to add 'O' flag to Status-header */
 			mail_ctx->need_rewrite = TRUE;
 		}
-		index_mailbox_set_recent(sync_ctx->ibox,
-					 mail_ctx->seq - mail_ctx->pseudo);
+		mail_ctx->recent = TRUE;
 	}
 	return 1;
 }
@@ -423,6 +422,9 @@
 		}
 	}
 
+	if (mail_ctx->recent)
+		index_mailbox_set_recent(sync_ctx->ibox, sync_ctx->idx_seq);
+
 	/* update from_offsets, but not if we're going to rewrite this message.
 	   rewriting would just move it anyway. */
 	if (sync_ctx->need_space_seq == 0) {



More information about the dovecot-cvs mailing list