aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--addressbook/ChangeLog6
-rw-r--r--addressbook/backend/pas/pas-backend-ldap.c17
2 files changed, 19 insertions, 4 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 180f9a3ded..fb8d3bf319 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,9 @@
+2001-08-14 Chris Toshok <toshok@ximian.com>
+
+ * backend/pas/pas-backend-ldap.c
+ (pas_backend_ldap_process_get_vcard): implement using
+ search_for_dn.
+
2001-08-14 Federico Mena Quintero <federico@ximian.com>
* gui/component/addressbook.c (addressbook_factory_new_control):
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,
+ "");
+ }
}