dovecot-2.2: fts-lucene: Fixed lookups from virtual mailboxes wi...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Feb 27 12:29:48 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/7f67e5c86af9
changeset: 18278:7f67e5c86af9
user: Timo Sirainen <tss at iki.fi>
date: Fri Feb 27 14:29:10 2015 +0200
description:
fts-lucene: Fixed lookups from virtual mailboxes with over 32 physical mailboxes.
diffstat:
src/plugins/fts-lucene/fts-backend-lucene.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r 6d788397444e -r 7f67e5c86af9 src/plugins/fts-lucene/fts-backend-lucene.c
--- a/src/plugins/fts-lucene/fts-backend-lucene.c Thu Feb 26 20:24:16 2015 +0200
+++ b/src/plugins/fts-lucene/fts-backend-lucene.c Fri Feb 27 14:29:10 2015 +0200
@@ -538,6 +538,12 @@
unsigned int i, j;
p_array_init(&box_results, result->pool, 32);
+ /* first create the box_results - we'll be using pointers to them
+ later on and appending to the array changes the pointers */
+ for (i = 0; boxes[i] != NULL; i++) {
+ box_result = array_append_space(&box_results);
+ box_result->box = boxes[i];
+ }
for (i = 0; boxes[i] != NULL; i++) {
if (fts_mailbox_get_guid(boxes[i], &guid) < 0)
return -1;
@@ -547,8 +553,7 @@
for (j = 0; j < MAILBOX_GUID_HEX_LENGTH; j++)
guid_dup[j] = guid[j];
- box_result = array_append_space(&box_results);
- box_result->box = boxes[i];
+ box_result = array_idx_modifiable(&box_results, i);
hash_table_insert(guids, guid_dup, box_result);
}
More information about the dovecot-cvs
mailing list