aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog8
-rw-r--r--mail/mail-config.c24
2 files changed, 17 insertions, 15 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 3af8a105d7..b8d46b87d1 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,11 @@
+2008-12-08 Sankar P <psankar@novell.com>
+
+ ** Fixes bug #552583
+
+ * mail/mail-config.c: (mail_config_get_account_by_source_url)
+ (mail_config_get_account_by_transport_url):
+ Fix the errors in the account checking logic.
+
2008-12-04 Matthew Barnes <mbarnes@redhat.com>
** Fixes bug #552583
diff --git a/mail/mail-config.c b/mail/mail-config.c
index c5a807e8d4..08dc799bbc 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -839,14 +839,11 @@ mail_config_get_account_by_source_url (const char *source_url)
e_iterator_next (iter);
- if (account->source == NULL)
- continue;
-
- else if (account->source->url == NULL)
- continue;
-
- else if (*account->source->url == '\0')
+ if ( !account || (account->source == NULL) ||
+ (account->source->url == NULL) || (*account->source->url == '\0')) {
+ account = NULL;
continue;
+ }
account_url = camel_url_new (account->source->url, NULL);
if (account_url == NULL)
@@ -883,14 +880,11 @@ mail_config_get_account_by_transport_url (const char *transport_url)
e_iterator_next (iter);
- if (account->transport == NULL)
- continue;
-
- else if (account->transport->url == NULL)
- continue;
-
- else if (*account->transport->url == '\0')
- continue;
+ if ( !account || (account->transport == NULL) ||
+ (account->transport->url == NULL) || (*account->transport->url == '\0')) {
+ account = NULL;
+ continue;
+ }
account_url = camel_url_new (account->transport->url, NULL);
if (account_url == NULL)