diff options
author | Jeffrey Stedfast <fejj@helixcode.com> | 2000-07-26 03:35:08 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2000-07-26 03:35:08 +0800 |
commit | 28288cc95b02571c9ede385411392d61abd7d409 (patch) | |
tree | bae2e5ac228698011163b73c6d2bdeb0b69b9eaf /camel | |
parent | be392a44144c4c4a1083d04c6ad948d4d63eb28e (diff) | |
download | gsoc2013-evolution-28288cc95b02571c9ede385411392d61abd7d409.tar.gz gsoc2013-evolution-28288cc95b02571c9ede385411392d61abd7d409.tar.zst gsoc2013-evolution-28288cc95b02571c9ede385411392d61abd7d409.zip |
Fixed the real problem that Peter was running into.
2000-07-25 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_summary_free): Fixed the
real problem that Peter was running into.
svn path=/trunk/; revision=4321
Diffstat (limited to 'camel')
-rw-r--r-- | camel/ChangeLog | 28 | ||||
-rw-r--r-- | camel/providers/imap/camel-imap-folder.c | 22 |
2 files changed, 29 insertions, 21 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 4e54f475db..b5dcef3b87 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,8 @@ +2000-07-25 Jeffrey Stedfast <fejj@helixcode.com> + + * providers/imap/camel-imap-folder.c (imap_summary_free): Fixed the + real problem that Peter was running into. + 2000-07-25 Dan Winship <danw@helixcode.com> * camel-mime-message.c (write_to_stream): Don't add a Mime-Version @@ -15,22 +20,25 @@ 2000-07-25 Jeffrey Stedfast <fejj@helixcode.com> - * providers/imap/camel-imap-folder.c (camel_imap_folder_changed): + * providers/imap/camel-imap-folder.c (camel_imap_folder_changed): Optimized to try and get the new message headers without reloading the entire summary from scratch. - (imap_get_summary_internal): Will now sync() before attempting to reload - the summary so that flags are set in the reloaded summary as well. + (imap_get_summary_internal): Will now sync() before attempting to + reload the summary so that flags are set in the reloaded summary + as well. 2000-07-24 Jeffrey Stedfast <fejj@helixcode.com> - * providers/imap/camel-imap-store.c (get_folder): Updated to give special - attention to the root folder. + * providers/imap/camel-imap-store.c (get_folder): Updated to give + special attention to the root folder. - * providers/imap/camel-imap-folder.c (imap_get_subfolder_names_internal): - Updated to handle the root folder - (imap_get_message_count_internal): return 0 if folder can't hold messages - (camel_imap_folder_new): Change so that root folder gets special attention - and always gets can_hold_messages set to FALSE + * providers/imap/camel-imap-folder.c + (imap_get_subfolder_names_internal): Updated to handle the root + folder + (imap_get_message_count_internal): return 0 if folder can't hold + messages + (camel_imap_folder_new): Change so that root folder gets special + attention and always gets can_hold_messages set to FALSE 2000-07-24 Dan Winship <danw@helixcode.com> diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c index 62ced1ff1d..a201c5360d 100644 --- a/camel/providers/imap/camel-imap-folder.c +++ b/camel/providers/imap/camel-imap-folder.c @@ -197,15 +197,16 @@ camel_imap_folder_new (CamelStore *parent, char *folder_name, CamelException *ex } static void -imap_summary_free (GPtrArray *summary) +imap_summary_free (GPtrArray **summary) { CamelMessageInfo *info; + GPtrArray *array = *summary; gint i, max; - if (summary) { - max = summary->len; + if (array) { + max = array->len; for (i = 0; i < max; i++) { - info = g_ptr_array_index (summary, i); + info = g_ptr_array_index (array, i); g_free (info->subject); g_free (info->from); g_free (info->to); @@ -217,8 +218,8 @@ imap_summary_free (GPtrArray *summary) info = NULL; } - g_ptr_array_free (summary, TRUE); - summary = NULL; + g_ptr_array_free (array, TRUE); + *summary = NULL; } } @@ -229,7 +230,7 @@ imap_finalize (GtkObject *object) CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (object); gint max, i; - imap_summary_free (imap_folder->summary); + imap_summary_free (&imap_folder->summary); if (imap_folder->lsub) { max = imap_folder->lsub->len; @@ -361,8 +362,7 @@ imap_expunge (CamelFolder *folder, CamelException *ex) /* FIXME: maybe remove the appropriate messages from the summary so we don't need to refetch the entire summary? */ - imap_summary_free (imap_folder->summary); - imap_folder->summary = NULL; + imap_summary_free (&imap_folder->summary); camel_imap_folder_changed (folder, -1, ex); } @@ -995,7 +995,7 @@ imap_get_summary_internal (CamelFolder *folder, CamelException *ex) switch (num) { case 0: /* clean up any previous summary data */ - imap_summary_free (imap_folder->summary); + imap_summary_free (&imap_folder->summary); imap_folder->summary = g_ptr_array_new (); @@ -1163,7 +1163,7 @@ imap_get_summary_internal (CamelFolder *folder, CamelException *ex) g_ptr_array_free (headers, TRUE); /* clean up any previous summary data */ - imap_summary_free (imap_folder->summary); + imap_summary_free (&imap_folder->summary); imap_folder->summary = summary; |