diff options
author | Dan Winship <danw@src.gnome.org> | 2000-11-02 10:52:21 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-11-02 10:52:21 +0800 |
commit | 24e7b7d5fcfe1d98a912570c554b74ca1a9f0f64 (patch) | |
tree | 527faa43c0d9884cdabbb228c4b6d831d48ea052 /camel/providers | |
parent | 710b5855179220dbc19af61ecc4f65e22f6465ed (diff) | |
download | gsoc2013-evolution-24e7b7d5fcfe1d98a912570c554b74ca1a9f0f64.tar gsoc2013-evolution-24e7b7d5fcfe1d98a912570c554b74ca1a9f0f64.tar.gz gsoc2013-evolution-24e7b7d5fcfe1d98a912570c554b74ca1a9f0f64.tar.bz2 gsoc2013-evolution-24e7b7d5fcfe1d98a912570c554b74ca1a9f0f64.tar.lz gsoc2013-evolution-24e7b7d5fcfe1d98a912570c554b74ca1a9f0f64.tar.xz 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/providers')
-rw-r--r-- | camel/providers/imap/camel-imap-store.c | 14 |
1 files changed, 11 insertions, 3 deletions
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 |