summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2007-10-11 15:06:50 +0000
committerMilan Crha <mcrha@src.gnome.org>2007-10-11 15:06:50 +0000
commita9eeeb48b0507047f5a70225e8b026ae20cdefd9 (patch)
tree18c03b05f2466535df1a748c8dc08ffd3e219cb3
parent38352029e25019aa53691adc66f36b729619dad0 (diff)
downloadevolution-data-server-a9eeeb48b0507047f5a70225e8b026ae20cdefd9.tar.gz
** Fix for bug #420167
2007-10-11 Milan Crha <mcrha@redhat.com> ** Fix for bug #420167 * addressbook/libebook/e-book.c: (e_book_unload_uri), (e_book_dispose): Be sure we released corba_book and stopped listener. * calendar/backends/contacts/e-cal-backend-contacts.c: (contact_record_new), (contact_record_free), (contact_record_cb_new): Ref and Unref backend used in ContactRecord to be sure it isn't freed before we endup with it. svn path=/branches/gnome-2-20/; revision=8111
-rw-r--r--addressbook/ChangeLog7
-rw-r--r--addressbook/libebook/e-book.c27
-rw-r--r--calendar/ChangeLog9
-rw-r--r--calendar/backends/contacts/e-cal-backend-contacts.c7
4 files changed, 30 insertions, 20 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index d78939f4a..7a00edef0 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,10 @@
+2007-10-11 Milan Crha <mcrha@redhat.com>
+
+ ** Fix for bug #420167
+
+ * libebook/e-book.c: (e_book_unload_uri), (e_book_dispose):
+ Be sure we released corba_book and stopped listener.
+
2007-09-07 Milan Crha <mcrha@redhat.com>
** Fix for bug #473880
diff --git a/addressbook/libebook/e-book.c b/addressbook/libebook/e-book.c
index fd8f2f921..7239a611b 100644
--- a/addressbook/libebook/e-book.c
+++ b/addressbook/libebook/e-book.c
@@ -119,9 +119,6 @@ typedef enum {
} EBookLoadState;
struct _EBookPrivate {
- GList *book_factories;
- GList *iter;
-
/* cached capabilites */
char *cap;
gboolean cap_queried;
@@ -3188,6 +3185,7 @@ e_book_unload_uri (EBook *book,
CORBA_exception_free (&ev);
+ book->priv->corba_book = CORBA_OBJECT_NIL;
e_book_listener_stop (book->priv->listener);
bonobo_object_unref (BONOBO_OBJECT (book->priv->listener));
@@ -4001,9 +3999,6 @@ e_book_dispose (GObject *object)
EBook *book = E_BOOK (object);
if (book->priv) {
- CORBA_Environment ev;
- GList *l;
-
if (book->priv->comp_listener) {
g_signal_handler_disconnect (book->priv->comp_listener, book->priv->died_signal);
g_object_unref (book->priv->comp_listener);
@@ -4013,21 +4008,19 @@ e_book_dispose (GObject *object)
if (book->priv->load_state == E_BOOK_SOURCE_LOADED)
e_book_unload_uri (book, NULL);
- CORBA_exception_init (&ev);
-
- for (l = book->priv->book_factories; l; l = l->next) {
- CORBA_Object_release ((CORBA_Object)l->data, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("EBook: Exception while releasing BookFactory\n");
+ if (book->priv->corba_book) {
+ CORBA_Environment ev;
- CORBA_exception_free (&ev);
- CORBA_exception_init (&ev);
- }
+ CORBA_exception_init (&ev);
+ bonobo_object_release_unref (book->priv->corba_book, &ev);
+ if (ev._major != CORBA_NO_EXCEPTION)
+ g_warning ("%s: Exception releasing remote book interface!\n", __FUNCTION__);
+ CORBA_exception_free (&ev);
}
-
- CORBA_exception_free (&ev);
if (book->priv->listener) {
+ e_book_listener_stop (book->priv->listener);
+
/* GLib bug compatibility */
if (g_signal_handler_is_connected (book->priv->listener, book->priv->listener_signal))
g_signal_handler_disconnect (book->priv->listener, book->priv->listener_signal);
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index f48c0f20e..25857a0c3 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,12 @@
+2007-10-11 Milan Crha <mcrha@redhat.com>
+
+ ** Fix for bug #420167
+
+ * backends/contacts/e-cal-backend-contacts.c: (contact_record_new),
+ (contact_record_free), (contact_record_cb_new):
+ Ref and Unref backend used in ContactRecord to be sure it isn't
+ freed before we endup with it.
+
2007-09-10 Chenthill Palanisamy <pchenthill@novell.com>
** Fix for bug #426421
diff --git a/calendar/backends/contacts/e-cal-backend-contacts.c b/calendar/backends/contacts/e-cal-backend-contacts.c
index ed4bdd579..d860a278a 100644
--- a/calendar/backends/contacts/e-cal-backend-contacts.c
+++ b/calendar/backends/contacts/e-cal-backend-contacts.c
@@ -141,7 +141,7 @@ contact_record_new (ECalBackendContacts *cbc, EContact *contact)
ContactRecord *cr = g_new0 (ContactRecord, 1);
char *comp_str;
- cr->cbc = cbc;
+ cr->cbc = g_object_ref (cbc);
cr->contact = contact;
cr->comp_birthday = create_birthday (cbc, contact);
cr->comp_anniversary = create_anniversary (cbc, contact);
@@ -196,7 +196,8 @@ contact_record_free (ContactRecord *cr)
g_free (comp_str);
g_object_unref (G_OBJECT (cr->comp_anniversary));
}
-
+
+ g_object_unref (cr->cbc);
g_free (cr);
}
@@ -212,7 +213,7 @@ contact_record_cb_new (ECalBackendContacts *cbc, ECalBackendSExp *sexp)
{
ContactRecordCB *cb_data = g_new (ContactRecordCB, 1);
- cb_data->cbc = cbc;
+ cb_data->cbc = g_object_ref (cbc);
cb_data->sexp = sexp;
cb_data->result = NULL;