]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap: Remove imapc-specific "is connection valid?" code
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Sun, 19 Mar 2017 13:34:20 +0000 (15:34 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 27 Mar 2017 10:09:44 +0000 (13:09 +0300)
This is now done by imapc itself in the previous patch

src/imap/main.c

index a5c7f718ae91576f061d6d974f7b76c8b3b76439..b9e9ff547fa82c61a00010279891f93044796ee4 100644 (file)
@@ -220,34 +220,15 @@ int client_create_from_input(const struct mail_storage_service_input *input,
 {
        struct mail_storage_service_user *user;
        struct mail_user *mail_user;
-       struct mail_namespace *ns;
        struct client *client;
        struct imap_settings *imap_set;
        struct lda_settings *lda_set;
-       const char *errstr;
-       enum mail_error mail_error;
 
        if (mail_storage_service_lookup_next(storage_service, input,
                                             &user, &mail_user, error_r) <= 0)
                return -1;
        restrict_access_allow_coredumps(TRUE);
 
-       /* this is mainly for imapc: make sure we can do at least minimal
-          access to the mailbox list or fail immediately. otherwise the IMAP
-          client could be trying a lot of commands and we'd return failures
-          for all of them. FIXME: There should be a bit less kludgy way to
-          check this, but I'm not sure if it's worth the trouble just for
-          imapc. */
-       ns = mail_namespace_find_inbox(mail_user->namespaces);
-       (void)mailbox_list_get_hierarchy_sep(ns->list);
-       errstr = mailbox_list_get_last_internal_error(ns->list, &mail_error);
-       if (mail_error != MAIL_ERROR_NONE) {
-               *error_r = t_strdup(errstr);
-               mail_user_unref(&mail_user);
-               mail_storage_service_user_unref(&user);
-               return -1;
-       }
-
        imap_set = mail_storage_service_user_get_set(user)[1];
        if (imap_set->verbose_proctitle)
                verbose_proctitle = TRUE;