Mercurial > dovecot > original-hg > dovecot-1.2
changeset 3347:12ee3c0ee2c9 HEAD
If mbox has a pseudo mail, we skipped message updates in partial syncs.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 27 Apr 2005 00:27:08 +0300 |
parents | 8e093a2cc8db |
children | 34dea04a191e |
files | src/lib-storage/index/mbox/mbox-sync.c |
diffstat | 1 files changed, 14 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/mbox/mbox-sync.c Tue Apr 26 22:12:08 2005 +0300 +++ b/src/lib-storage/index/mbox/mbox-sync.c Wed Apr 27 00:27:08 2005 +0300 @@ -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) {