changeset 6355:08ee6385e7a9 HEAD

Fixed infinite loop if a transaction was seen for messages that weren't visible in this session yet.
author Timo Sirainen <tss@iki.fi>
date Sat, 08 Sep 2007 03:29:08 +0300
parents 8476d665530f
children f4fa0970f855
files src/imap/imap-sync.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/imap/imap-sync.c	Sun Sep 02 07:44:50 2007 +0300
+++ b/src/imap/imap-sync.c	Sat Sep 08 03:29:08 2007 +0300
@@ -123,8 +123,10 @@
 		if (ctx->sync_rec.seq2 > ctx->messages_count) {
 			/* don't send change notifications of messages we
 			   haven't even announced to client yet */
-			if (ctx->sync_rec.seq1 > ctx->messages_count)
+			if (ctx->sync_rec.seq1 > ctx->messages_count) {
+				ctx->seq = 0;
 				continue;
+			}
 			ctx->sync_rec.seq2 = ctx->messages_count;
 		}