aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorSankar P <psankar@novell.com>2008-12-08 13:49:35 +0800
committerSankarasivasubramanian Pasupathilingam <psankar@src.gnome.org>2008-12-08 13:49:35 +0800
commit3059297cddb1838ad733600efa1185bcb7ddde2f (patch)
tree1e0fae34e4287579016754ee8311d2c9b48f9354 /mail
parent7223655df2828370ab19f14953ecd22a30a4b55f (diff)
downloadgsoc2013-evolution-3059297cddb1838ad733600efa1185bcb7ddde2f.tar
gsoc2013-evolution-3059297cddb1838ad733600efa1185bcb7ddde2f.tar.gz
gsoc2013-evolution-3059297cddb1838ad733600efa1185bcb7ddde2f.tar.bz2
gsoc2013-evolution-3059297cddb1838ad733600efa1185bcb7ddde2f.tar.lz
gsoc2013-evolution-3059297cddb1838ad733600efa1185bcb7ddde2f.tar.xz
gsoc2013-evolution-3059297cddb1838ad733600efa1185bcb7ddde2f.tar.zst
gsoc2013-evolution-3059297cddb1838ad733600efa1185bcb7ddde2f.zip
** Fixes bug #552583
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. svn path=/trunk/; revision=36839
Diffstat (limited to 'mail')
-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)