aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-config.c
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/mail-config.c
parentaf47f89be4ce04dd33ba7b374f7f95aa86f0ebb4 (diff)
downloadgsoc2013-evolution-a80ff8ee769b26022592bcbe173957fa31f34e61.tar.gz
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/mail-config.c')
-rw-r--r--mail/mail-config.c16
1 files changed, 8 insertions, 8 deletions
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;