diff options
author | Milan Crha <mcrha@redhat.com> | 2012-10-18 18:50:38 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2012-10-18 18:50:38 +0800 |
commit | 96777ceb3aad387bc3332ae960a0c2c140b9212f (patch) | |
tree | 5be0d4c4ecaba75c8607b961e7e256a558a120c6 | |
parent | 8c81665473fc4fbd66da70d6215a26848eb6446c (diff) | |
download | gsoc2013-evolution-96777ceb3aad387bc3332ae960a0c2c140b9212f.tar.gz gsoc2013-evolution-96777ceb3aad387bc3332ae960a0c2c140b9212f.tar.zst gsoc2013-evolution-96777ceb3aad387bc3332ae960a0c2c140b9212f.zip |
Bug #310978 - USENET always requires authentication
-rw-r--r-- | modules/mail-config/e-mail-config-remote-accounts.c | 13 |
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; |