From fc49986ee1e24c28eced9cdff1813ea34ee68755 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Wed, 25 Jul 2001 02:15:05 +0000 Subject: Change the break into a continue, we should process as many as we can 2001-07-24 Not Zed * providers/imap/camel-imap-folder.c (camel_imap_folder_changed): Change the break into a continue, we should process as many as we can find. * camel-folder.c (camel_folder_move_messages_to): If we have no uid's to copy, exit here before going any further. Some code internally [imap] assumes there are uids to copy otherwise it can segfault. (camel_folder_copy_messages_to): Same. svn path=/trunk/; revision=11392 --- camel/ChangeLog | 12 ++++++++++++ camel/camel-folder.c | 8 ++++---- camel/providers/imap/camel-imap-folder.c | 2 +- 3 files changed, 17 insertions(+), 5 deletions(-) (limited to 'camel') diff --git a/camel/ChangeLog b/camel/ChangeLog index 549841417e..211f714473 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,15 @@ +2001-07-24 Not Zed + + * providers/imap/camel-imap-folder.c (camel_imap_folder_changed): + Change the break into a continue, we should process as many as we + can find. + + * camel-folder.c (camel_folder_move_messages_to): If we have no + uid's to copy, exit here before going any further. Some code + internally [imap] assumes there are uids to copy otherwise it can + segfault. + (camel_folder_copy_messages_to): Same. + 2001-07-24 Jeffrey Stedfast * camel-mime-utils.c (header_decode_param): Handle broken mailers diff --git a/camel/camel-folder.c b/camel/camel-folder.c index 2326fb6300..ca40c8b0dc 100644 --- a/camel/camel-folder.c +++ b/camel/camel-folder.c @@ -1147,8 +1147,8 @@ camel_folder_copy_messages_to (CamelFolder *source, GPtrArray *uids, g_return_if_fail (CAMEL_IS_FOLDER (dest)); g_return_if_fail (uids != NULL); - if (source == dest) { - /* source and destination folders are the same, do nothing. */ + if (source == dest || uids->len == 0) { + /* source and destination folders are the same, or no work to do, do nothing. */ return; } @@ -1228,8 +1228,8 @@ camel_folder_move_messages_to (CamelFolder *source, GPtrArray *uids, g_return_if_fail (CAMEL_IS_FOLDER (dest)); g_return_if_fail (uids != NULL); - if (source == dest) { - /* source and destination folders are the same, nothing to do. */ + if (source == dest || uids->len == 0) { + /* source and destination folders are the same, or no work to do, nothing to do. */ return; } diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c index 36136d452c..88b8e5f1b5 100644 --- a/camel/providers/imap/camel-imap-folder.c +++ b/camel/providers/imap/camel-imap-folder.c @@ -1681,7 +1681,7 @@ camel_imap_folder_changed (CamelFolder *folder, int exists, if (info == NULL) { /* FIXME: danw: does this mean that the summary is corrupt? */ /* I guess a message that we never retrieved got expunged? */ - break; + continue; } camel_folder_change_info_remove_uid (changes, camel_message_info_uid (info)); -- cgit