aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2001-05-12 03:57:15 +0800
committerJP Rosevear <jpr@src.gnome.org>2001-05-12 03:57:15 +0800
commite3efaa319aabdfe6b3329fae1b9cee8a0ea877f3 (patch)
tree74dbe6e0a3ac5c9e6559d9595f65de6cab8cb896
parent6febeab3270c35664cc3938d4f89b9c292550040 (diff)
downloadgsoc2013-evolution-e3efaa319aabdfe6b3329fae1b9cee8a0ea877f3.tar
gsoc2013-evolution-e3efaa319aabdfe6b3329fae1b9cee8a0ea877f3.tar.gz
gsoc2013-evolution-e3efaa319aabdfe6b3329fae1b9cee8a0ea877f3.tar.bz2
gsoc2013-evolution-e3efaa319aabdfe6b3329fae1b9cee8a0ea877f3.tar.lz
gsoc2013-evolution-e3efaa319aabdfe6b3329fae1b9cee8a0ea877f3.tar.xz
gsoc2013-evolution-e3efaa319aabdfe6b3329fae1b9cee8a0ea877f3.tar.zst
gsoc2013-evolution-e3efaa319aabdfe6b3329fae1b9cee8a0ea877f3.zip
add proto
2001-05-11 JP Rosevear <jpr@ximian.com> * mail-importer.h: add proto * mail-importer.c (mail_importer_uninit): release and unref the local storage * mail-local.c (mail_local_store_finalize): use bonobo_object_release_unref rather than doing Bonobo_Unknow_unref and a corba release (register_folder_registered): "sink" the local_store ref to prevent circular ref (mail_local_storage_shutdown): unref the local store * mail-local.h: new proto * component-factory.c (owner_unset_cb): uninit the importer and shutdown the local storage svn path=/trunk/; revision=9768
-rw-r--r--mail/ChangeLog19
-rw-r--r--mail/component-factory.c2
-rw-r--r--mail/mail-importer.c6
-rw-r--r--mail/mail-importer.h2
-rw-r--r--mail/mail-local.c13
-rw-r--r--mail/mail-local.h1
6 files changed, 39 insertions, 4 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index d72cf5b544..a7d9d35c49 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,22 @@
+2001-05-11 JP Rosevear <jpr@ximian.com>
+
+ * mail-importer.h: add proto
+
+ * mail-importer.c (mail_importer_uninit): release and unref the
+ local storage
+
+ * mail-local.c (mail_local_store_finalize): use
+ bonobo_object_release_unref rather than doing Bonobo_Unknow_unref
+ and a corba release
+ (register_folder_registered): "sink" the local_store ref to
+ prevent circular ref
+ (mail_local_storage_shutdown): unref the local store
+
+ * mail-local.h: new proto
+
+ * component-factory.c (owner_unset_cb): uninit the importer and
+ shutdown the local storage
+
2001-05-11 Jeffrey Stedfast <fejj@ximian.com>
* mail-local.c (mail_local_reconfigure_folder): Set a title on the
diff --git a/mail/component-factory.c b/mail/component-factory.c
index 26796201a1..9a3e657ca0 100644
--- a/mail/component-factory.c
+++ b/mail/component-factory.c
@@ -265,6 +265,8 @@ static void
owner_unset_cb (EvolutionShellComponent *shell_component, gpointer user_data)
{
unref_standard_folders ();
+ mail_importer_uninit ();
+ mail_local_storage_shutdown ();
g_idle_add_full (G_PRIORITY_LOW, idle_quit, NULL, NULL);
}
diff --git a/mail/mail-importer.c b/mail/mail-importer.c
index dd30807645..500897ea59 100644
--- a/mail/mail-importer.c
+++ b/mail/mail-importer.c
@@ -242,6 +242,7 @@ mail_importer_init (EvolutionShellClient *client)
void
mail_importer_uninit (void)
{
+ CORBA_Environment ev;
GList *l;
for (l = importer_modules; l; l = l->next) {
@@ -250,5 +251,10 @@ mail_importer_uninit (void)
g_list_free (importer_modules);
importer_modules = NULL;
+
+ CORBA_exception_init (&ev);
+ bonobo_object_release_unref (local_storage, &ev);
+ local_storage = NULL;
+ CORBA_exception_free (&ev);
}
diff --git a/mail/mail-importer.h b/mail/mail-importer.h
index 350671a8ad..23b555d6b8 100644
--- a/mail/mail-importer.h
+++ b/mail/mail-importer.h
@@ -38,6 +38,8 @@ struct _MailImporter {
};
void mail_importer_init (EvolutionShellClient *client);
+void mail_importer_uninit (void);
+
void mail_importer_add_line (MailImporter *importer,
const char *str,
gboolean finished);
diff --git a/mail/mail-local.c b/mail/mail-local.c
index 5c27fb0e0a..71c2c4919b 100644
--- a/mail/mail-local.c
+++ b/mail/mail-local.c
@@ -285,10 +285,8 @@ mail_local_store_finalize (gpointer object)
CORBA_Environment ev;
CORBA_exception_init (&ev);
- if (!CORBA_Object_is_nil (local_store->corba_local_storage, &ev)) {
- Bonobo_Unknown_unref (local_store->corba_local_storage, &ev);
- CORBA_Object_release (local_store->corba_local_storage, &ev);
- }
+ if (!CORBA_Object_is_nil (local_store->corba_local_storage, &ev))
+ bonobo_object_release_unref (local_store->corba_local_storage, &ev);
CORBA_exception_free (&ev);
if (local_store->local_storage_listener)
@@ -564,6 +562,8 @@ register_folder_registered(struct _mail_msg *mm)
if (local_folder->folder) {
g_hash_table_insert (local_folder->local_store->folders, local_folder->uri + 8,
local_folder);
+ /* Remove the circular ref once the local store knows aboutthe folder */
+ camel_object_unref ((CamelObject *)local_folder->local_store);
/* add the folder to the vfolder lists FIXME: merge stuff above with this */
vfolder_register_source(local_folder->folder);
@@ -732,6 +732,11 @@ mail_local_storage_startup (EvolutionShellClient *shellclient,
CORBA_exception_free (&ev);
}
+void
+mail_local_storage_shutdown (void)
+{
+ camel_object_unref (CAMEL_OBJECT (local_store));
+}
/* Local folder reconfiguration stuff */
diff --git a/mail/mail-local.h b/mail/mail-local.h
index 254fcbe4f6..f61a843843 100644
--- a/mail/mail-local.h
+++ b/mail/mail-local.h
@@ -32,6 +32,7 @@
void mail_local_storage_startup (EvolutionShellClient *shellclient,
const char *evolution_path);
+void mail_local_storage_shutdown (void);
void mail_local_reconfigure_folder (FolderBrowser *fb);