changeset 21825:f04be671add7

imap: Remove imapc-specific "is connection valid?" code This is now done by imapc itself in the previous patch
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Sun, 19 Mar 2017 15:34:20 +0200
parents d228cc8cf685
children bb83a3781301
files src/imap/main.c
diffstat 1 files changed, 0 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/src/imap/main.c	Sun Mar 19 15:32:53 2017 +0200
+++ b/src/imap/main.c	Sun Mar 19 15:34:20 2017 +0200
@@ -220,34 +220,15 @@
 {
 	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;