Mercurial > dovecot > original-hg > dovecot-1.2
changeset 170:00e52ea54ed4 HEAD
Put back the "not all messages were found" error to
mail_index_uidset_foreach(). Now it's only sent when they weren't found
because they were just expunged and client wasn't notified yet, not when
they don't exist anymore.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 07 Sep 2002 04:46:07 +0300 |
parents | 53e8e405266b |
children | 4716cf66c2cc |
files | src/lib-index/mail-messageset.c |
diffstat | 1 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-index/mail-messageset.c Sat Sep 07 04:32:49 2002 +0300 +++ b/src/lib-index/mail-messageset.c Sat Sep 07 04:46:07 2002 +0300 @@ -202,7 +202,7 @@ rec = index->lookup_uid_range(index, uid, uid2); if (rec == NULL) - return 2; + return expunges_found ? 2 : 1; seq = index->get_sequence(index, rec); while (rec != NULL && rec->uid <= uid2) { @@ -229,7 +229,7 @@ return -1; } - return 1; + return expunges_found ? 2 : 1; } int mail_index_uidset_foreach(MailIndex *index, const char *uidset, @@ -240,7 +240,7 @@ MailIndexRecord *rec; const char *input; unsigned int uid, uid2; - int ret; + int ret, all_found; i_assert(index->lock_type != MAIL_LOCK_UNLOCK); @@ -250,6 +250,7 @@ return 1; } + all_found = TRUE; input = uidset; while (*input != '\0') { if (*input == '*') { @@ -300,8 +301,10 @@ func, context, error); if (ret <= 0) return ret; + if (ret == 2) + all_found = FALSE; } } - return 1; + return all_found ? 1 : 2; }