From e1111e8e763aae61113117debde9931dcf642b76 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Sun, 13 Aug 2000 20:35:44 +0000 Subject: Fix bug in the folder creation code: CORBA_Object_duplicate() the CORBA listener before storing it. svn path=/trunk/; revision=4804 --- mail/ChangeLog | 6 ++++++ mail/mail-ops.c | 15 +++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) (limited to 'mail') diff --git a/mail/ChangeLog b/mail/ChangeLog index f6101c4622..f9182603e1 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,9 @@ +2000-08-13 Ettore Perazzoli + + * mail-ops.c (mail_do_create_folder): Duplicate the listener + object. + (cleanup_create_folder): Free the listener. + 2000-08-13 Jeffrey Stedfast * mail-threads.c (get_password): Don't wrap the gnome_dialog_run diff --git a/mail/mail-ops.c b/mail/mail-ops.c index 9ba7f29e1c..787b23bd43 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -1330,8 +1330,6 @@ setup_create_folder (gpointer in_data, gpointer op_data, CamelException *ex) "No type passed to create_folder"); return; } - - /* FIXME: reference listener somehow? */ } static void @@ -1378,12 +1376,12 @@ cleanup_create_folder (gpointer in_data, gpointer op_data, camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, "Exception while reporting result to shell " "component listener."); - CORBA_exception_free (&ev); - - /* FIXME: unref listener somehow? */ + CORBA_free (input->listener); g_free (input->uri); g_free (input->type); + + CORBA_exception_free (&ev); } static const mail_operation_spec op_create_folder = { @@ -1398,13 +1396,18 @@ void mail_do_create_folder (const Evolution_ShellComponentListener listener, const char *uri, const char *type) { + CORBA_Environment ev; create_folder_input_t *input; + CORBA_exception_init (&ev); + input = g_new (create_folder_input_t, 1); - input->listener = listener; + input->listener = CORBA_Object_duplicate (listener, &ev); input->uri = g_strdup (uri); input->type = g_strdup (type); + CORBA_exception_free (&ev); + mail_operation_queue (&op_create_folder, input, FALSE); } -- cgit