aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2001-08-15 13:10:37 +0800
committerChris Toshok <toshok@src.gnome.org>2001-08-15 13:10:37 +0800
commitd5b8c3deb5a964635121671d3c76ffb82709cdf0 (patch)
tree0996be6af8817a6483b7d9bae138391a4b62d8df
parentb4c3c0fa9b3fa9ce8ad64784ccf183e16b084b8c (diff)
downloadgsoc2013-evolution-d5b8c3deb5a964635121671d3c76ffb82709cdf0.tar
gsoc2013-evolution-d5b8c3deb5a964635121671d3c76ffb82709cdf0.tar.gz
gsoc2013-evolution-d5b8c3deb5a964635121671d3c76ffb82709cdf0.tar.bz2
gsoc2013-evolution-d5b8c3deb5a964635121671d3c76ffb82709cdf0.tar.lz
gsoc2013-evolution-d5b8c3deb5a964635121671d3c76ffb82709cdf0.tar.xz
gsoc2013-evolution-d5b8c3deb5a964635121671d3c76ffb82709cdf0.tar.zst
gsoc2013-evolution-d5b8c3deb5a964635121671d3c76ffb82709cdf0.zip
implement using search_for_dn.
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. svn path=/trunk/; revision=12043
-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,
+ "");
+ }
}