aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2005-08-11 11:55:17 +0800
committerMichael Zucci <zucchi@src.gnome.org>2005-08-11 11:55:17 +0800
commita80ff8ee769b26022592bcbe173957fa31f34e61 (patch)
tree3359b72b912a136f18df4756e814f96dc8e66137 /mail
parentaf47f89be4ce04dd33ba7b374f7f95aa86f0ebb4 (diff)
downloadgsoc2013-evolution-a80ff8ee769b26022592bcbe173957fa31f34e61.tar
gsoc2013-evolution-a80ff8ee769b26022592bcbe173957fa31f34e61.tar.gz
gsoc2013-evolution-a80ff8ee769b26022592bcbe173957fa31f34e61.tar.bz2
gsoc2013-evolution-a80ff8ee769b26022592bcbe173957fa31f34e61.tar.lz
gsoc2013-evolution-a80ff8ee769b26022592bcbe173957fa31f34e61.tar.xz
gsoc2013-evolution-a80ff8ee769b26022592bcbe173957fa31f34e61.tar.zst
gsoc2013-evolution-a80ff8ee769b26022592bcbe173957fa31f34e61.zip
** See #271985.
2005-08-10 Not Zed <NotZed@Ximian.com> ** See #271985. * mail-config.c (mail_config_write_on_exit) (mail_config_get_account_by_source_url) (mail_config_get_account_by_transport_url) (mail_config_get_default_transport): * mail-component.c (load_accounts): check url for content before using it. svn path=/trunk/; revision=30081
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog12
-rw-r--r--mail/mail-component.c1
-rw-r--r--mail/mail-config.c16
3 files changed, 21 insertions, 8 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 33439d45b7..6eaeb924a1 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,15 @@
+2005-08-10 Not Zed <NotZed@Ximian.com>
+
+ ** See #271985.
+
+ * mail-config.c (mail_config_write_on_exit)
+ (mail_config_get_account_by_source_url)
+ (mail_config_get_account_by_transport_url)
+ (mail_config_get_default_transport):
+
+ * mail-component.c (load_accounts): check url for content before
+ using it.
+
2005-08-09 Not Zed <NotZed@Ximian.com>
** See #312715.
diff --git a/mail/mail-component.c b/mail/mail-component.c
index b8aa43d910..e6a1c4fe69 100644
--- a/mail/mail-component.c
+++ b/mail/mail-component.c
@@ -324,6 +324,7 @@ load_accounts (MailComponent *component, EAccountList *accounts)
any that come through as account sources are really movemail sources! */
if (account->enabled
&& service->url != NULL
+ && service->url[0]
&& strncmp(service->url, "mbox:", 5) != 0)
mail_component_load_store_by_uri (component, service->url, name);
diff --git a/mail/mail-config.c b/mail/mail-config.c
index 92620b6494..7d3a876a47 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -425,14 +425,14 @@ mail_config_write_on_exit (void)
account = (EAccount *) e_iterator_get (iter);
- if (account->source->save_passwd && account->source->url) {
+ if (account->source->save_passwd && account->source->url && account->source->url[0]) {
passwd = mail_session_get_password (account->source->url);
mail_session_forget_password (account->source->url);
mail_session_add_password (account->source->url, passwd);
g_free (passwd);
}
- if (account->transport->save_passwd && account->transport->url) {
+ if (account->transport->save_passwd && account->transport->url && account->transport->url[0]) {
passwd = mail_session_get_password (account->transport->url);
mail_session_forget_password (account->transport->url);
mail_session_add_password (account->transport->url, passwd);
@@ -452,10 +452,10 @@ mail_config_write_on_exit (void)
while (e_iterator_is_valid (iter)) {
account = (EAccount *) e_iterator_get (iter);
- if (account->source->save_passwd && account->source->url)
+ if (account->source->save_passwd && account->source->url && account->source->url[0])
mail_session_remember_password (account->source->url);
- if (account->transport->save_passwd && account->transport->url)
+ if (account->transport->save_passwd && account->transport->url && account->transport->url[0])
mail_session_remember_password (account->transport->url);
e_iterator_next (iter);
@@ -602,7 +602,7 @@ mail_config_get_account_by_source_url (const char *source_url)
while (e_iterator_is_valid (iter)) {
account = (EAccount *) e_iterator_get (iter);
- if (account->source && account->source->url) {
+ if (account->source && account->source->url && account->source->url[0]) {
CamelURL *url;
url = camel_url_new (account->source->url, NULL);
@@ -650,7 +650,7 @@ mail_config_get_account_by_transport_url (const char *transport_url)
while (e_iterator_is_valid (iter)) {
account = (EAccount *) e_iterator_get (iter);
- if (account->transport && account->transport->url) {
+ if (account->transport && account->transport->url && account->transport->url[0]) {
CamelURL *url;
url = camel_url_new (account->transport->url, NULL);
@@ -741,7 +741,7 @@ mail_config_get_default_transport (void)
EIterator *iter;
account = mail_config_get_default_account ();
- if (account && account->transport && account->transport->url)
+ if (account && account->transport && account->transport->url && account->transport->url[0])
return account->transport;
/* return the first account with a transport? */
@@ -749,7 +749,7 @@ mail_config_get_default_transport (void)
while (e_iterator_is_valid (iter)) {
account = (EAccount *) e_iterator_get (iter);
- if (account->transport && account->transport->url) {
+ if (account->transport && account->transport->url && account->transport->url[0]) {
g_object_unref (iter);
return account->transport;