From 093a00cf2bba85c4f1f0826dde1cb500ecc415d6 Mon Sep 17 00:00:00 2001 From: 0 Date: Tue, 30 Oct 2001 03:28:40 +0000 Subject: Argh!!! Dont free the async op data here, the async op is still running 2001-10-30 * 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 --- mail/subscribe-dialog.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'mail/subscribe-dialog.c') 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; } -- cgit v1.2.3