aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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