aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2000-08-14 04:35:44 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2000-08-14 04:35:44 +0800
commite1111e8e763aae61113117debde9931dcf642b76 (patch)
tree99db0f1a5b3df0830f936300d0be87445cf7e2a8 /mail
parent639b2e2157425d4b4c011c1e74a91bb02a2e9338 (diff)
downloadgsoc2013-evolution-e1111e8e763aae61113117debde9931dcf642b76.tar
gsoc2013-evolution-e1111e8e763aae61113117debde9931dcf642b76.tar.gz
gsoc2013-evolution-e1111e8e763aae61113117debde9931dcf642b76.tar.bz2
gsoc2013-evolution-e1111e8e763aae61113117debde9931dcf642b76.tar.lz
gsoc2013-evolution-e1111e8e763aae61113117debde9931dcf642b76.tar.xz
gsoc2013-evolution-e1111e8e763aae61113117debde9931dcf642b76.tar.zst
gsoc2013-evolution-e1111e8e763aae61113117debde9931dcf642b76.zip
Fix bug in the folder creation code: CORBA_Object_duplicate() the
CORBA listener before storing it. svn path=/trunk/; revision=4804
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/mail-ops.c15
2 files changed, 15 insertions, 6 deletions
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 <ettore@helixcode.com>
+
+ * mail-ops.c (mail_do_create_folder): Duplicate the listener
+ object.
+ (cleanup_create_folder): Free the listener.
+
2000-08-13 Jeffrey Stedfast <fejj@helixcode.com>
* 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);
}