aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-11-02 10:52:21 +0800
committerDan Winship <danw@src.gnome.org>2000-11-02 10:52:21 +0800
commit24e7b7d5fcfe1d98a912570c554b74ca1a9f0f64 (patch)
tree527faa43c0d9884cdabbb228c4b6d831d48ea052 /camel
parent710b5855179220dbc19af61ecc4f65e22f6465ed (diff)
downloadgsoc2013-evolution-24e7b7d5fcfe1d98a912570c554b74ca1a9f0f64.tar.gz
gsoc2013-evolution-24e7b7d5fcfe1d98a912570c554b74ca1a9f0f64.tar.zst
gsoc2013-evolution-24e7b7d5fcfe1d98a912570c554b74ca1a9f0f64.zip
Remove old subbed folders from hash table after freeing them.
* providers/imap/camel-imap-store.c (get_folder_info): Remove old subbed folders from hash table after freeing them. svn path=/trunk/; revision=6335
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog3
-rw-r--r--camel/providers/imap/camel-imap-store.c14
2 files changed, 14 insertions, 3 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 114f8ca5be..6e02a11ca6 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,8 @@
2000-11-01 Dan Winship <danw@helixcode.com>
+ * providers/imap/camel-imap-store.c (get_folder_info): Remove old
+ subbed folders from hash table after freeing them.
+
* providers/imap/camel-imap-folder.c (imap_get_full_name): Deal
correctly with namespace == ""
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index 8d53f7579c..c42024bd5f 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -106,12 +106,20 @@ camel_imap_store_class_init (CamelImapStoreClass *camel_imap_store_class)
camel_remote_store_class->keepalive = imap_keepalive;
}
+static gboolean
+free_sub (gpointer key, gpointer value, gpointer user_data)
+{
+ g_free (key);
+ return TRUE;
+}
+
static void
camel_imap_store_finalize (CamelObject *object)
{
CamelImapStore *imap_store = CAMEL_IMAP_STORE (object);
- g_hash_table_foreach (imap_store->subscribed_folders, (GHFunc)g_free, NULL);
+ g_hash_table_foreach_remove (imap_store->subscribed_folders,
+ free_sub, NULL);
g_hash_table_destroy (imap_store->subscribed_folders);
}
@@ -648,8 +656,8 @@ get_folder_info (CamelStore *store, const char *top, gboolean fast,
return NULL;
if (subscribed_only) {
- g_hash_table_foreach (imap_store->subscribed_folders,
- (GHFunc)g_free, NULL);
+ g_hash_table_foreach_remove (imap_store->subscribed_folders,
+ free_sub, NULL);
}
/* Turn responses into CamelFolderInfo and remove any