From fa6e5a7b97476a193fcbb856f0ebaf29e0a4cce2 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Sat, 17 Feb 2001 01:30:55 +0000 Subject: Not sure it makes any difference, but lets ref the folder while the hash 2001-02-16 Jeffrey Stedfast * mail-send-recv.c (receive_get_folder): Not sure it makes any difference, but lets ref the folder while the hash table is locked rather than after we unlock it. svn path=/trunk/; revision=8260 --- mail/mail-send-recv.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'mail/mail-send-recv.c') diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c index 09afe0d0d3..6eace378d3 100644 --- a/mail/mail-send-recv.c +++ b/mail/mail-send-recv.c @@ -69,7 +69,7 @@ struct _send_data { GnomeDialog *gd; int cancelled; - CamelFolder *inbox; /* since w'ere never asked to uypdate this one, do it ourselves */ + CamelFolder *inbox; /* since we're never asked to update this one, do it ourselves */ time_t inbox_update; GMutex *lock; @@ -320,7 +320,7 @@ static struct _send_data *build_dialogue(GSList *sources, CamelFolder *outbox, c info->bar = bar; info->stop = stop; info->data = data; - + gtk_signal_connect((GtkObject *)stop, "clicked", receive_cancel, info); gtk_widget_show_all((GtkWidget *)table); } @@ -550,9 +550,11 @@ receive_get_folder(CamelFilterDriver *d, const char *uri, void *data, CamelExcep oldinfo->uri = g_strdup(uri); g_hash_table_insert(info->data->folders, oldinfo->uri, oldinfo); } + + camel_object_ref (CAMEL_OBJECT (folder)); + g_mutex_unlock(info->data->lock); - - camel_object_ref((CamelObject *)folder); + return folder; } -- cgit