Skip to content

Commit

Permalink
imap: Remove imapc-specific "is connection valid?" code
Browse files Browse the repository at this point in the history
This is now done by imapc itself in the previous patch
  • Loading branch information
sirainen authored and GitLab committed Mar 26, 2017
1 parent 92cd929 commit 3c90202
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions src/imap/main.c
Expand Up @@ -220,34 +220,16 @@ 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;
Expand Down

0 comments on commit 3c90202

Please sign in to comment.