From e09ebe7a80a11a33d5c393fddcb39e3ee95f7f9e Mon Sep 17 00:00:00 2001 From: Not Zed Date: Tue, 9 Dec 2003 03:21:40 +0000 Subject: ** See bug #51899. 2003-12-09 Not Zed ** See bug #51899. * providers/imap/camel-imap-store.c (get_folders): add the first fi to the info's hash, so we dont duplicate it if we come across it again (which we generally will). svn path=/trunk/; revision=23889 --- camel/ChangeLog | 8 ++++++++ camel/camel-store.c | 1 + camel/providers/imap/camel-imap-store.c | 5 +++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/camel/ChangeLog b/camel/ChangeLog index 94ffcdc39b..00df1f6bf9 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -6,6 +6,14 @@ (header_decode_param): Same. (header_decode_param_list): Here too. +2003-12-09 Not Zed + + ** See bug #51899. + + * providers/imap/camel-imap-store.c (get_folders): add the first + fi to the info's hash, so we dont duplicate it if we come across + it again (which we generally will). + 2003-12-09 Not Zed * providers/smtp/camel-smtp-transport.c (smtp_send_to): encode the diff --git a/camel/camel-store.c b/camel/camel-store.c index 8d576d4583..c076128c38 100644 --- a/camel/camel-store.c +++ b/camel/camel-store.c @@ -953,6 +953,7 @@ camel_folder_info_build (GPtrArray *folders, const char *namespace, name = fi->full_name; if (*name == separator) name++; + g_hash_table_insert (hash, g_strdup(name), fi); } diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c index 07152eef87..2d6337896f 100644 --- a/camel/providers/imap/camel-imap-store.c +++ b/camel/providers/imap/camel-imap-store.c @@ -2498,6 +2498,7 @@ get_folders(CamelStore *store, const char *top, guint32 flags, CamelException *e fi = q->data; q = g_slist_remove_link(q, q); + g_hash_table_insert(infos, fi->full_name, fi); g_ptr_array_add(folders_out, fi); d(printf("Checking folder '%s'\n", fi->full_name)); @@ -2574,10 +2575,10 @@ get_folder_info_online (CamelStore *store, const char *top, guint32 flags, Camel if (folders == NULL) return NULL; - + tree = camel_folder_info_build(folders, top, '/', TRUE); g_ptr_array_free(folders, TRUE); - + if (!(flags & CAMEL_STORE_FOLDER_INFO_FAST)) get_folder_counts(imap_store, tree, ex); -- cgit