From 431ccc85ea20f6a9490bb783de63b11daf0587c5 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 4 Sep 2017 16:59:52 +0300 Subject: [PATCH] lib-storage: Remove INBOX notification checks if mailbox events aren't requested Nothing would be done with the results of those checks. Note that MAILBOX_LIST_NOTIFY_UIDVALIDITY can be handled using mailbox list index, even for INBOX with mailbox_list_index_include_inbox=no. --- src/lib-storage/list/mailbox-list-index-notify.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib-storage/list/mailbox-list-index-notify.c b/src/lib-storage/list/mailbox-list-index-notify.c index e6260887a5..cc2a023ec9 100644 --- a/src/lib-storage/list/mailbox-list-index-notify.c +++ b/src/lib-storage/list/mailbox-list-index-notify.c @@ -105,6 +105,8 @@ int mailbox_list_index_notify_init(struct mailbox_list *list, /* INBOX can be handled also using mailbox list index */ } else if ((list->ns->flags & NAMESPACE_FLAG_INBOX_ANY) == 0) { /* no INBOX in this namespace */ + } else if ((mask & MAILBOX_LIST_NOTIFY_STATUS) == 0) { + /* not interested in mailbox changes */ } else if (mailbox_list_get_path(list, "INBOX", MAILBOX_LIST_PATH_TYPE_INDEX, &index_dir) <= 0) { /* no indexes for INBOX? can't handle it */ -- 2.47.3