dovecot-1.2: Sort index sometimes failed wrongly with "Sort IDs ...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Jun 26 21:35:18 EEST 2008
details: http://hg.dovecot.org/dovecot-1.2/rev/d75fdd0fb8b2
changeset: 7954:d75fdd0fb8b2
user: Timo Sirainen <tss at iki.fi>
date: Thu Jun 26 21:35:06 2008 +0300
description:
Sort index sometimes failed wrongly with "Sort IDs broken" errors.
diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
src/lib-storage/index/index-sort-string.c | 4 +++-
diffs (14 lines):
diff -r 01c23befce4f -r d75fdd0fb8b2 src/lib-storage/index/index-sort-string.c
--- a/src/lib-storage/index/index-sort-string.c Thu Jun 26 21:33:36 2008 +0300
+++ b/src/lib-storage/index/index-sort-string.c Thu Jun 26 21:35:06 2008 +0300
@@ -613,7 +613,9 @@ index_sort_add_ids_range(struct sort_str
}
nodes[i].sort_id_changed = TRUE;
}
- return right_str == NULL || strcmp(str, right_str) < 0 ? 0 : -1;
+ return right_str == NULL || strcmp(str, right_str) < 0 ||
+ (strcmp(str, right_str) == 0 &&
+ nodes[i-1].sort_id == right_sort_id) ? 0 : -1;
}
static int
More information about the dovecot-cvs
mailing list