Mercurial > dovecot > core-2.2
changeset 22189:7728c01e1603
imapc: Remove root_sep_lookup_failed cache
The auth_failed_* should already be enough for this. This removal also
fixes the storage error message to be auth_failed_reason when possible.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Mon, 12 Jun 2017 11:57:52 +0300 |
parents | c6e7ba218fb3 |
children | 8417c11ea653 |
files | src/lib-storage/index/imapc/imapc-list.c |
diffstat | 1 files changed, 5 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/imapc/imapc-list.c Mon Jun 12 12:07:52 2017 +0300 +++ b/src/lib-storage/index/imapc/imapc-list.c Mon Jun 12 11:57:52 2017 +0300 @@ -329,12 +329,9 @@ struct imapc_mailbox_list *list = (struct imapc_mailbox_list *)_list; char sep; - if (list->root_sep_lookup_failed || - imapc_list_try_get_root_sep(list, &sep) < 0) { + if (imapc_list_try_get_root_sep(list, &sep) < 0) { /* we can't really return a failure here. just return a common separator and fail all the future list operations. */ - list->root_sep_lookup_failed = TRUE; - mailbox_list_set_internal_error(_list); return '/'; } return sep; @@ -551,13 +548,10 @@ struct imapc_simple_context ctx; struct mailbox_node *node; const char *pattern; + char sep; - if (imapc_storage_client_handle_auth_failure(list->client)) + if (imapc_list_try_get_root_sep(list, &sep) < 0) return -1; - if (list->root_sep_lookup_failed) { - mailbox_list_set_internal_error(&list->list); - return -1; - } if (list->refreshed_mailboxes) return 0; @@ -783,14 +777,12 @@ struct imapc_simple_context ctx; struct imapc_command *cmd; const char *pattern; - char dest_sep = mail_namespace_get_sep(dest_list->ns); + char list_sep, dest_sep = mail_namespace_get_sep(dest_list->ns); i_assert(src_list->tmp_subscriptions == NULL); - if (src_list->root_sep_lookup_failed) { - mailbox_list_set_internal_error(_src_list); + if (imapc_list_try_get_root_sep(src_list, &list_sep) < 0) return -1; - } if (src_list->refreshed_subscriptions) { if (dest_list->subscriptions == NULL)