aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-04-05 16:11:46 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-04-05 16:11:46 +0800
commit0c10ef9d8f6cf5585c995a753f6e63ae350259a1 (patch)
tree026e1848df2b669bd971410f0fdd25a45037955c /mail
parent00559e4cf7127175023c43ac7b8f9caa18c0aacb (diff)
downloadgsoc2013-evolution-0c10ef9d8f6cf5585c995a753f6e63ae350259a1.tar.gz
gsoc2013-evolution-0c10ef9d8f6cf5585c995a753f6e63ae350259a1.tar.zst
gsoc2013-evolution-0c10ef9d8f6cf5585c995a753f6e63ae350259a1.zip
** See bug # 56402.
2004-04-05 Not Zed <NotZed@Ximian.com> ** See bug # 56402. * mail-folder-cache.c (update_folders): if we're cancelled, noop. (mail_note_store_remove): mark the update data cancelled. * mail-ops.c (get_folderinfo_got): Removed the meaningless comment here. svn path=/trunk/; revision=25312
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/mail-folder-cache.c8
-rw-r--r--mail/mail-ops.c2
3 files changed, 12 insertions, 4 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 4d470fc32c..e37424553c 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,8 +1,14 @@
2004-04-05 Not Zed <NotZed@Ximian.com>
+ ** See bug # 56402.
+
+ * mail-folder-cache.c (update_folders): if we're cancelled, noop.
+ (mail_note_store_remove): mark the update data cancelled.
+
* mail-ops.c (add_special_info): removed, this is done in camel
now.
(fix_unmatched_info): renamed from add_unmatched_info.
+ (get_folderinfo_got): Removed the meaningless comment here.
2004-04-02 Jeffrey Stedfast <fejj@ximian.com>
diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c
index e9bbee1c93..4f8ef4441e 100644
--- a/mail/mail-folder-cache.c
+++ b/mail/mail-folder-cache.c
@@ -702,6 +702,7 @@ struct _update_data {
struct _update_data *prev;
int id; /* id for cancellation */
+ int cancel:1; /* also tells us we're cancelled */
void (*done)(CamelStore *store, CamelFolderInfo *info, void *data);
void *data;
@@ -747,6 +748,7 @@ mail_note_store_remove(CamelStore *store)
while (ud->next) {
d(printf("Cancelling outstanding folderinfo update %d\n", ud->id));
mail_msg_cancel(ud->id);
+ ud->cancel = 1;
ud = ud->next;
}
@@ -769,7 +771,7 @@ update_folders(CamelStore *store, CamelFolderInfo *fi, void *data)
LOCK(info_lock);
si = g_hash_table_lookup(stores, store);
- if (si) {
+ if (si && !ud->cancel) {
/* the 'si' is still there, so we can remove ourselves from its list */
/* otherwise its not, and we're on our own and free anyway */
e_dlist_remove((EDListNode *)ud);
@@ -863,7 +865,7 @@ store_online_cb (CamelStore *store, void *data)
LOCK(info_lock);
- if (g_hash_table_lookup(stores, store) != NULL) {
+ if (g_hash_table_lookup(stores, store) != NULL && !ud->cancel) {
/* re-use the cancel id. we're already in the store update list too */
ud->id = mail_get_folderinfo(store, NULL, update_folders, ud);
} else {
@@ -926,6 +928,7 @@ mail_note_store(CamelStore *store, CamelOperation *op,
ud = g_malloc(sizeof(*ud));
ud->done = done;
ud->data = data;
+ ud->cancel = 0;
/* Note: we use the 'id' here, even though its not the right id, its still ok */
ud->id = mail_store_set_offline (store, FALSE, store_online_cb, ud);
@@ -936,6 +939,7 @@ mail_note_store(CamelStore *store, CamelOperation *op,
ud = g_malloc (sizeof (*ud));
ud->done = done;
ud->data = data;
+ ud->cancel = 0;
ud->id = mail_get_folderinfo (store, op, update_folders, ud);
e_dlist_addtail (&si->folderinfo_updates, (EDListNode *) ud);
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 3c0827d16f..ca80fffa7d 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -1038,8 +1038,6 @@ get_folderinfo_got (struct _mail_msg *mm)
g_free (url);
}
- /* 'done' is probably guaranteed to fail, but... */
-
if (m->done)
m->done (m->store, m->info, m->data);
}