dovecot-1.2: fts: Fixed crashing with Squat.
dovecot at dovecot.org
dovecot at dovecot.org
Fri Aug 7 22:12:09 EEST 2009
details: http://hg.dovecot.org/dovecot-1.2/rev/96b764649cbb
changeset: 9292:96b764649cbb
user: Timo Sirainen <tss at iki.fi>
date: Fri Aug 07 15:12:04 2009 -0400
description:
fts: Fixed crashing with Squat.
A better solution would be for Squat to use existing mailboxes' Squat
indexes, but for now this isn't done.
diffstat:
3 files changed, 6 insertions(+), 3 deletions(-)
src/plugins/fts-solr/fts-backend-solr.c | 2 +-
src/plugins/fts/fts-api-private.h | 4 +++-
src/plugins/fts/fts-storage.c | 3 ++-
diffs (39 lines):
diff -r 682e09eb1e8f -r 96b764649cbb src/plugins/fts-solr/fts-backend-solr.c
--- a/src/plugins/fts-solr/fts-backend-solr.c Fri Aug 07 14:57:10 2009 -0400
+++ b/src/plugins/fts-solr/fts-backend-solr.c Fri Aug 07 15:12:04 2009 -0400
@@ -796,7 +796,7 @@ static int fts_backend_solr_lookup(struc
struct fts_backend fts_backend_solr = {
MEMBER(name) "solr",
- MEMBER(flags) 0,
+ MEMBER(flags) FTS_BACKEND_FLAG_VIRTUAL_LOOKUPS,
{
fts_backend_solr_init,
diff -r 682e09eb1e8f -r 96b764649cbb src/plugins/fts/fts-api-private.h
--- a/src/plugins/fts/fts-api-private.h Fri Aug 07 14:57:10 2009 -0400
+++ b/src/plugins/fts/fts-api-private.h Fri Aug 07 15:12:04 2009 -0400
@@ -43,7 +43,9 @@ enum fts_backend_flags {
/* If set, the backend is used for TEXT and BODY search
optimizations. Otherwise only TEXT_FAST and BODY_FAST are
optimized. */
- FTS_BACKEND_FLAG_SUBSTRING_LOOKUPS = 0x01
+ FTS_BACKEND_FLAG_SUBSTRING_LOOKUPS = 0x01,
+ /* Backend supports virtual mailbox lookups. */
+ FTS_BACKEND_FLAG_VIRTUAL_LOOKUPS = 0x02
};
struct fts_backend {
diff -r 682e09eb1e8f -r 96b764649cbb src/plugins/fts/fts-storage.c
--- a/src/plugins/fts/fts-storage.c Fri Aug 07 14:57:10 2009 -0400
+++ b/src/plugins/fts/fts-storage.c Fri Aug 07 15:12:04 2009 -0400
@@ -441,7 +441,8 @@ static int fts_build_init(struct fts_sea
return 0;
}
- if (fctx->fbox->virtual)
+ if (fctx->fbox->virtual &&
+ (fctx->build_backend->flags & FTS_BACKEND_FLAG_VIRTUAL_LOOKUPS) != 0)
ret = fts_build_init_virtual(fctx);
else
ret = fts_build_init_trans(fctx, fctx->t);
More information about the dovecot-cvs
mailing list