From d5b8c3deb5a964635121671d3c76ffb82709cdf0 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Wed, 15 Aug 2001 05:10:37 +0000 Subject: implement using search_for_dn. 2001-08-14 Chris Toshok * backend/pas/pas-backend-ldap.c (pas_backend_ldap_process_get_vcard): implement using search_for_dn. svn path=/trunk/; revision=12043 --- addressbook/backend/pas/pas-backend-ldap.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'addressbook/backend/pas') diff --git a/addressbook/backend/pas/pas-backend-ldap.c b/addressbook/backend/pas/pas-backend-ldap.c index 350fc7a0f6..fd87bc1b19 100644 --- a/addressbook/backend/pas/pas-backend-ldap.c +++ b/addressbook/backend/pas/pas-backend-ldap.c @@ -1072,14 +1072,23 @@ pas_backend_ldap_process_get_vcard (PASBackend *backend, PASRequest *req) { PASBackendLDAP *bl; + ECardSimple *simple; bl = PAS_BACKEND_LDAP (pas_book_get_backend (book)); - /* XXX use ldap_search */ + simple = search_for_dn (bl, req->id); - pas_book_respond_get_vcard (book, - GNOME_Evolution_Addressbook_BookListener_Success, - ""); + if (simple) { + pas_book_respond_get_vcard (book, + GNOME_Evolution_Addressbook_BookListener_Success, + e_card_simple_get_vcard (simple)); + gtk_object_unref (GTK_OBJECT (simple)); + } + else { + pas_book_respond_get_vcard (book, + GNOME_Evolution_Addressbook_BookListener_CardNotFound, + ""); + } } -- cgit