aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@novell.com>2004-08-24 22:02:22 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-08-24 22:02:22 +0800
commitca56f39c8f41075870dde30e446349d7155854c1 (patch)
treea3769d110d6f306fa6094c9ea4695263588cdfec
parent35645d523e2f62a8742218e092afdad84f7221a1 (diff)
downloadgsoc2013-evolution-ca56f39c8f41075870dde30e446349d7155854c1.tar
gsoc2013-evolution-ca56f39c8f41075870dde30e446349d7155854c1.tar.gz
gsoc2013-evolution-ca56f39c8f41075870dde30e446349d7155854c1.tar.bz2
gsoc2013-evolution-ca56f39c8f41075870dde30e446349d7155854c1.tar.lz
gsoc2013-evolution-ca56f39c8f41075870dde30e446349d7155854c1.tar.xz
gsoc2013-evolution-ca56f39c8f41075870dde30e446349d7155854c1.tar.zst
gsoc2013-evolution-ca56f39c8f41075870dde30e446349d7155854c1.zip
Check for an exception from get_folders_online() here so that we don't
2004-08-23 Jeffrey Stedfast <fejj@novell.com> * providers/imap/camel-imap-store.c (get_folders): Check for an exception from get_folders_online() here so that we don't send commands to an IMAP server after a disconnect for example. See bug #63504 for an example. svn path=/trunk/; revision=27005
-rw-r--r--camel/ChangeLog7
-rw-r--r--camel/providers/imap/camel-imap-store.c10
2 files changed, 14 insertions, 3 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 1677cfbb20..fd009e2f4f 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -9,6 +9,13 @@
2004-08-23 Jeffrey Stedfast <fejj@novell.com>
+ * providers/imap/camel-imap-store.c (get_folders): Check for an
+ exception from get_folders_online() here so that we don't send
+ commands to an IMAP server after a disconnect for example. See bug
+ #63504 for an example.
+
+2004-08-23 Jeffrey Stedfast <fejj@novell.com>
+
* camel-tcp-stream-openssl.c (open_ssl_connection): Call
SSL_CTX_set_default_verify_paths() to initialise the certificate
database paths. Thanks to Anton Altaparmakov for this fix.
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index 4ba85ef39b..af031bdc47 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -2814,7 +2814,7 @@ static GPtrArray *
get_folders(CamelStore *store, const char *top, guint32 flags, CamelException *ex)
{
CamelImapStore *imap_store = CAMEL_IMAP_STORE (store);
- GSList *p = NULL;
+ GSList *q, *p = NULL;
GHashTable *infos;
int i;
GPtrArray *folders, *folders_out;
@@ -2885,7 +2885,7 @@ get_folders(CamelStore *store, const char *top, guint32 flags, CamelException *e
/* p is a reversed list of pending folders for the next level, q is the list of folders for this */
while (p) {
- GSList *q = g_slist_reverse(p);
+ q = g_slist_reverse(p);
p = NULL;
while (q) {
@@ -2913,7 +2913,10 @@ get_folders(CamelStore *store, const char *top, guint32 flags, CamelException *e
get_folders_online(imap_store, n, folders, flags & CAMEL_STORE_FOLDER_INFO_SUBSCRIBED, ex);
g_free(n);
g_free(real);
-
+
+ if (camel_exception_is_set (ex))
+ goto fail;
+
if (folders->len > 0)
fi->flags |= CAMEL_FOLDER_CHILDREN;
@@ -2933,6 +2936,7 @@ fail:
g_ptr_array_free(folders, TRUE);
g_ptr_array_free(folders_out, TRUE);
g_hash_table_destroy(infos);
+ g_slist_free (p);
g_free(name);
return NULL;