[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync.c, 1.158, 1.159

cras at dovecot.org cras at dovecot.org
Wed Apr 27 00:27:10 EEST 2005


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

Modified Files:
	mbox-sync.c 
Log Message:
If mbox has a pseudo mail, we skipped message updates in partial syncs.



Index: mbox-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync.c,v
retrieving revision 1.158
retrieving revision 1.159
diff -u -d -r1.158 -r1.159
--- mbox-sync.c	26 Apr 2005 19:10:47 -0000	1.158
+++ mbox-sync.c	26 Apr 2005 21:27:08 -0000	1.159
@@ -995,18 +995,23 @@
 				uid = mail_ctx->mail.uid = rec->uid;
 		}
 
-		if (!mail_ctx->pseudo) {
+		/* get all sync records related to this message. with pseudo
+		   message just get the first sync record so we can jump to
+		   it with partial seeking. */
+		if (mbox_sync_read_index_syncs(sync_ctx,
+					       mail_ctx->pseudo ? 1 : uid,
+					       &expunged) < 0)
+			return -1;
+
+		if (mail_ctx->pseudo) {
+			/* if it was set, it was for the next message */
+			expunged = FALSE;
+		} else {
 			if (rec == NULL) {
-				/* from now on, don't skip anything */
+				/* message wasn't found from index. we have to
+				   read everything from now on, no skipping */
 				partial = FALSE;
 			}
-
-			/* get all sync records related to this message */
-			if (mbox_sync_read_index_syncs(sync_ctx, uid,
-						       &expunged) < 0)
-				return -1;
-		} else {
-			expunged = FALSE;
 		}
 
 		if (uid == 0 && !mail_ctx->pseudo) {



More information about the dovecot-cvs mailing list