From 79e4b347761c3cd897f2e9ed0ee7e25231ae49f3 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Mon, 1 May 2000 20:58:15 +0000 Subject: Add back in the CORBA_Object_release. 2000-05-01 Christopher James Lahey * backend/pas/pas-book-factory.c: Add back in the CORBA_Object_release. * backend/pas/pas-book.c: Properly duplicate and release the listener passed to us. svn path=/trunk/; revision=2720 --- addressbook/backend/pas/pas-book-factory.c | 3 +-- addressbook/backend/pas/pas-book.c | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) (limited to 'addressbook/backend/pas') diff --git a/addressbook/backend/pas/pas-book-factory.c b/addressbook/backend/pas/pas-book-factory.c index 78b031233a..cd7a8d3ed9 100644 --- a/addressbook/backend/pas/pas-book-factory.c +++ b/addressbook/backend/pas/pas-book-factory.c @@ -269,7 +269,7 @@ pas_book_factory_process_request (PASBookFactory *factory, out: g_free (uri); -#if 0 + CORBA_exception_init (&ev); CORBA_Object_release (listener, &ev); @@ -277,7 +277,6 @@ pas_book_factory_process_request (PASBookFactory *factory, g_message ("pas_book_factory_process_request(): could not release the listener"); CORBA_exception_free (&ev); -#endif } static gboolean diff --git a/addressbook/backend/pas/pas-book.c b/addressbook/backend/pas/pas-book.c index d6e9ff55ac..2601d3d9d0 100644 --- a/addressbook/backend/pas/pas-book.c +++ b/addressbook/backend/pas/pas-book.c @@ -487,6 +487,14 @@ pas_book_construct (PASBook *book, bonobo_object_construct (BONOBO_OBJECT (book), obj); + CORBA_exception_init (&ev); + book->priv->listener = CORBA_Object_duplicate (listener, &ev); + + if (ev._major != CORBA_NO_EXCEPTION) + g_message ("pas_book_construct(): could not duplicate the listener"); + + CORBA_exception_free (&ev); + book->priv->listener = listener; book->priv->get_vcard = get_vcard; book->priv->backend = backend; @@ -523,6 +531,7 @@ pas_book_destroy (GtkObject *object) { PASBook *book = PAS_BOOK (object); GList *l; + CORBA_Environment ev; for (l = book->priv->request_queue; l != NULL; l = l->next) { PASRequest *req = l->data; @@ -533,6 +542,14 @@ pas_book_destroy (GtkObject *object) } g_list_free (book->priv->request_queue); + CORBA_exception_init (&ev); + CORBA_Object_release (book->priv->listener, &ev); + + if (ev._major != CORBA_NO_EXCEPTION) + g_message ("pas_book_construct(): could not release the listener"); + + CORBA_exception_free (&ev); + g_free (book->priv); GTK_OBJECT_CLASS (pas_book_parent_class)->destroy (object); -- cgit v1.2.3