dovecot-2.1: indexer-worker: If indexes are disabled for a mailb...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Nov 7 22:06:53 EET 2011
details: http://hg.dovecot.org/dovecot-2.1/rev/d0a071b6847c
changeset: 13668:d0a071b6847c
user: Timo Sirainen <tss at iki.fi>
date: Mon Nov 07 22:17:15 2011 +0200
description:
indexer-worker: If indexes are disabled for a mailbox, do nothing but log a message.
diffstat:
src/indexer/master-connection.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diffs (26 lines):
diff -r 9da49294f49d -r d0a071b6847c src/indexer/master-connection.c
--- a/src/indexer/master-connection.c Mon Nov 07 20:45:55 2011 +0200
+++ b/src/indexer/master-connection.c Mon Nov 07 22:17:15 2011 +0200
@@ -118,7 +118,7 @@
struct mail_namespace *ns;
struct mailbox *box;
struct mailbox_status status;
- const char *errstr;
+ const char *path, *errstr;
enum mail_error error;
enum mailbox_sync_flags sync_flags = MAILBOX_SYNC_FLAG_FULL_READ;
int ret = 0;
@@ -129,6 +129,13 @@
return -1;
}
+ path = mailbox_list_get_path(ns->list, mailbox,
+ MAILBOX_LIST_PATH_TYPE_INDEX);
+ if (*path == '\0') {
+ i_info("Indexes disabled for Mailbox %s, skipping", mailbox);
+ return 0;
+ }
+
box = mailbox_alloc(ns->list, mailbox, 0);
if (max_recent_msgs != 0) {
/* index only if there aren't too many recent messages.
More information about the dovecot-cvs
mailing list