From e17651e6354f0519cbf8c74a205b311e99d55748 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Tue, 19 Feb 2002 00:20:21 +0000 Subject: if the load_uri fails, notify the listener that the repository is offline. 2002-02-18 Chris Toshok * backend/pas/pas-book-factory.c (pas_book_factory_process_request): if the load_uri fails, notify the listener that the repository is offline. (partial fix for bug 20347) svn path=/trunk/; revision=15758 --- addressbook/ChangeLog | 7 +++++++ addressbook/backend/pas/pas-book-factory.c | 18 +++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) (limited to 'addressbook') diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 9bb07ebb63..cade85649a 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,10 @@ +2002-02-18 Chris Toshok + + * backend/pas/pas-book-factory.c + (pas_book_factory_process_request): if the load_uri fails, notify + the listener that the repository is offline. (partial fix for bug + 20347) + 2002-02-18 Chris Toshok * backend/pas/pas-backend-ldap.c (create_dn_from_ecard): escape diff --git a/addressbook/backend/pas/pas-book-factory.c b/addressbook/backend/pas/pas-book-factory.c index 76e73ceca0..43bb69a35c 100644 --- a/addressbook/backend/pas/pas-book-factory.c +++ b/addressbook/backend/pas/pas-book-factory.c @@ -282,8 +282,24 @@ pas_book_factory_process_request (PASBookFactory *factory, if (!backend) goto out; - if (!pas_backend_load_uri (backend, uri)) + if (!pas_backend_load_uri (backend, uri) ) { + /* tell the listener that we failed to open the book */ + CORBA_exception_init (&ev); + + GNOME_Evolution_Addressbook_BookListener_notifyBookOpened ( + listener, GNOME_Evolution_Addressbook_BookListener_RepositoryOffline, + CORBA_OBJECT_NIL, + &ev); + + if (ev._major != CORBA_NO_EXCEPTION) { + g_warning ("pas_book_respond_open: Exception " + "responding to BookListener!\n"); + } + + CORBA_exception_free (&ev); + goto out; + } pas_backend_add_client (backend, listener); -- cgit v1.2.3