aboutsummaryrefslogtreecommitdiffstats
path: root/mail/subscribe-dialog.c
diff options
context:
space:
mode:
author0 <NotZed@Ximian.com>2001-10-30 11:28:40 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-10-30 11:28:40 +0800
commit093a00cf2bba85c4f1f0826dde1cb500ecc415d6 (patch)
treeafd4239a5665fbdd3f3e9dd048a818295084f44e /mail/subscribe-dialog.c
parente01b1cb6625883a4db723209c743dc03abc112ef (diff)
downloadgsoc2013-evolution-093a00cf2bba85c4f1f0826dde1cb500ecc415d6.tar.gz
gsoc2013-evolution-093a00cf2bba85c4f1f0826dde1cb500ecc415d6.tar.zst
gsoc2013-evolution-093a00cf2bba85c4f1f0826dde1cb500ecc415d6.zip
Argh!!! Dont free the async op data here, the async op is still running
2001-10-30 <NotZed@Ximian.com> * subscribe-dialog.c (fe_cancel_op_foreach): Argh!!! Dont free the async op data here, the async op is still running and will access it! Just try to cancel it and mark it as cancelled (id == -1) (fe_done_subscribing): Only remove outselves from the hash table if we're not cancelled. The handle should always be set here, since this code runs in the gui thread. * message-list.c (on_cursor_activated_idle): If nothing selected/cursor not activated, then select no message. * mail-folder-cache.c (update_1folder): Make the trash count optional on EVOLUTION_COUNT_TRASH, becuase some lusers are just too stupid to understand what its for. * component-factory.c (storage_xfer_folder): Return slightly better error codes for copying folders, since its not implemented yet. * mail-vfolder.c, mail-local.c, mail-folder-cache.c, message-list.c component-factory.c, mail-ops.c, subscribe-dialog.c, mail-session.c: d() out some debug printfs, w() out some warnings. * folder-browser-ui.c (folder_browser_ui_add_message): Fix typo, Resent->Resend. svn path=/trunk/; revision=14412
Diffstat (limited to 'mail/subscribe-dialog.c')
-rw-r--r--mail/subscribe-dialog.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/mail/subscribe-dialog.c b/mail/subscribe-dialog.c
index e594b6dd5e..25d6290094 100644
--- a/mail/subscribe-dialog.c
+++ b/mail/subscribe-dialog.c
@@ -53,7 +53,7 @@
#include "art/empty.xpm"
#include "art/mark.xpm"
-#define d(x) x
+#define d(x)
/* Things to test.
* - Feature
@@ -829,7 +829,7 @@ fe_done_subscribing (const char *full_name, const char *name, gboolean subscribe
{
ftree_op_data *closure = (ftree_op_data *) user_data;
- if (success) {
+ if (success && closure->handle != -1) {
char *path;
path = fe_node_to_shell_path (closure->data);
@@ -850,7 +850,9 @@ fe_done_subscribing (const char *full_name, const char *name, gboolean subscribe
e_tree_model_node_data_changed (E_TREE_MODEL (closure->ftree), closure->path);
}
- g_hash_table_remove (closure->ftree->subscribe_ops, closure->path);
+ if (closure->handle != -1)
+ g_hash_table_remove (closure->ftree->subscribe_ops, closure->path);
+
g_free (closure);
}
@@ -864,10 +866,9 @@ fe_cancel_op_foreach (gpointer key, gpointer value, gpointer user_data)
if (closure->handle != -1)
mail_msg_cancel (closure->handle);
- else
- printf ("aaagh, annoying race condition in fe_cancel_op_foreach.\n");
- g_free (value);
+ closure->handle = -1;
+
return TRUE;
}
@@ -1135,7 +1136,7 @@ static void
store_data_async_get_store (StoreData *sd, StoreDataStoreFunc func, gpointer user_data)
{
if (sd->request_id) {
- printf ("Already loading store, nooping\n");
+ d(printf ("Already loading store, nooping\n"));
return;
}