[evolution] Bug #638810 - Crash in camel_folder_search_set_folder with IMAP account
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug #638810 - Crash in camel_folder_search_set_folder with IMAP account
- Date: Fri, 6 Jan 2012 18:01:57 +0000 (UTC)
commit 02bcba4fad4a8a9254b1179f3442d056098cf9a3
Author: Milan Crha <mcrha redhat com>
Date: Fri Jan 6 19:01:30 2012 +0100
Bug #638810 - Crash in camel_folder_search_set_folder with IMAP account
mail/mail-vfolder.c | 22 +++++++++-------------
1 files changed, 9 insertions(+), 13 deletions(-)
---
diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c
index 7afcb6c..f5039d9 100644
--- a/mail/mail-vfolder.c
+++ b/mail/mail-vfolder.c
@@ -239,16 +239,17 @@ vfolder_adduri_exec (struct _adduri_msg *m,
/* we dont try lookup the cache if we are removing it, its no longer there */
if (!m->remove &&
- !mail_folder_cache_get_folder_from_uri (folder_cache, m->uri, &folder)) {
+ !mail_folder_cache_get_folder_from_uri (folder_cache, m->uri, NULL)) {
g_warning (
"Folder '%s' disappeared while I was "
"adding/removing it to/from my vfolder", m->uri);
return;
}
- if (folder == NULL)
- folder = e_mail_session_uri_to_folder_sync (
- m->session, m->uri, 0, cancellable, error);
+ /* always pick fresh folders - they are
+ from CamelStore's folders bag anyway */
+ folder = e_mail_session_uri_to_folder_sync (
+ m->session, m->uri, 0, cancellable, error);
if (folder != NULL) {
l = m->folders;
@@ -678,7 +679,6 @@ rule_add_sources (EMailSession *session,
GList *sources_folder = *sources_folderp;
GList *sources_uri = *sources_urip;
MailFolderCache *folder_cache;
- CamelFolder *newfolder;
GList *head, *link;
folder_cache = e_mail_session_get_folder_cache (session);
@@ -687,14 +687,10 @@ rule_add_sources (EMailSession *session,
for (link = head; link != NULL; link = g_list_next (link)) {
const gchar *uri = link->data;
- if (mail_folder_cache_get_folder_from_uri (
- folder_cache, uri, &newfolder)) {
- if (newfolder)
- sources_folder = g_list_append (
- sources_folder, newfolder);
- else
- sources_uri = g_list_append (
- sources_uri, g_strdup (uri));
+ /* always pick fresh folders - they are
+ from CamelStore's folders bag anyway */
+ if (mail_folder_cache_get_folder_from_uri (folder_cache, uri, NULL)) {
+ sources_uri = g_list_append (sources_uri, g_strdup (uri));
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]