Mercurial > dovecot > original-hg > dovecot-1.2
changeset 378:225d515edaa1 HEAD
sequence number still wasn't right always
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 07 Oct 2002 14:50:48 +0300 |
parents | 356fe3713970 |
children | b319eb0fc181 |
files | src/lib-index/mail-tree-redblack.c |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-index/mail-tree-redblack.c Sun Oct 06 21:27:57 2002 +0300 +++ b/src/lib-index/mail-tree-redblack.c Mon Oct 07 14:50:48 2002 +0300 @@ -657,10 +657,14 @@ if (first_uid < last_uid) { /* get the next key, make sure it's in range */ x = rb_successor(tree, y); - if (node[x].key <= last_uid) - *seq_r = seq + 2; - else + if (node[x].key > last_uid) x = RBNULL; + else { + /* this is the easiest way to get the sequence right */ + return mail_tree_lookup_uid_range(tree, seq_r, + node[x].key, + node[x].key); + } } return x == RBNULL ? 0 : node[x].value;