aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mail-config
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2012-10-18 18:50:10 +0800
committerMilan Crha <mcrha@redhat.com>2012-10-18 18:50:10 +0800
commit3d06be9671085e99ebc37a89acd394255a9d0ff0 (patch)
tree8e30e525f96538c2a16e27931f2d06cf1e24b22f /modules/mail-config
parentf2642ef7074669502325f8f9210ad04d29432190 (diff)
downloadgsoc2013-evolution-3d06be9671085e99ebc37a89acd394255a9d0ff0.tar.gz
gsoc2013-evolution-3d06be9671085e99ebc37a89acd394255a9d0ff0.tar.zst
gsoc2013-evolution-3d06be9671085e99ebc37a89acd394255a9d0ff0.zip
Bug #310978 - USENET always requires authentication
Diffstat (limited to 'modules/mail-config')
-rw-r--r--modules/mail-config/e-mail-config-remote-accounts.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/modules/mail-config/e-mail-config-remote-accounts.c b/modules/mail-config/e-mail-config-remote-accounts.c
index 984438e768..491db0207f 100644
--- a/modules/mail-config/e-mail-config-remote-accounts.c
+++ b/modules/mail-config/e-mail-config-remote-accounts.c
@@ -318,6 +318,7 @@ mail_config_remote_backend_check_complete (EMailConfigServiceBackend *backend)
EMailConfigRemoteBackend *remote_backend;
CamelSettings *settings;
CamelNetworkSettings *network_settings;
+ CamelProvider *provider;
EPortEntry *port_entry;
const gchar *host;
const gchar *user;
@@ -325,19 +326,25 @@ mail_config_remote_backend_check_complete (EMailConfigServiceBackend *backend)
remote_backend = E_MAIL_CONFIG_REMOTE_BACKEND (backend);
settings = e_mail_config_service_backend_get_settings (backend);
+ provider = e_mail_config_service_backend_get_provider (backend);
+
+ g_return_val_if_fail (provider != NULL, FALSE);
network_settings = CAMEL_NETWORK_SETTINGS (settings);
host = camel_network_settings_get_host (network_settings);
user = camel_network_settings_get_user (network_settings);
- if (host == NULL || *host == '\0')
+ if (CAMEL_PROVIDER_NEEDS (provider, CAMEL_URL_PART_HOST) &&
+ (host == NULL || *host == '\0'))
return FALSE;
port_entry = E_PORT_ENTRY (remote_backend->port_entry);
- if (!e_port_entry_is_valid (port_entry))
+ if (CAMEL_PROVIDER_NEEDS (provider, CAMEL_URL_PART_PORT) &&
+ !e_port_entry_is_valid (port_entry))
return FALSE;
- if (user == NULL || *user == '\0')
+ if (CAMEL_PROVIDER_NEEDS (provider, CAMEL_URL_PART_USER) &&
+ (user == NULL || *user == '\0'))
return FALSE;
return TRUE;