From fcf3a94b1c2431d3d91d066070af53871b526386 Mon Sep 17 00:00:00 2001 From: eknauel Date: Thu, 12 Feb 2004 15:49:18 +0000 Subject: [PATCH] (ldap-get-values): if ldap_get_values() returns NULL, that's not necessarily an error (ldap-entry-dn): renamed ldap-message-dn to ldap-entry-dn --- scheme/ldap.scm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/scheme/ldap.scm b/scheme/ldap.scm index 779905c..8d0813b 100644 --- a/scheme/ldap.scm +++ b/scheme/ldap.scm @@ -268,8 +268,13 @@ "scsh_ldap_get_values") (define (ldap-get-values session entry attribute-name) - (or (ldap-get-values-internal session (ldap-entry-message entry) attribute-name) - (raise-ldap-condition (ldap-get-error-return-object session) session))) + (let ((val (ldap-get-values-internal + session (ldap-entry-message entry) attribute-name))) + (or val + (let ((ret-obj (ldap-get-error-return-object session))) + (if (ldap-success? ret-obj) + val + (raise-ldap-condition ret-obj session)))))) ;;; @@ -292,8 +297,8 @@ (session message) "scsh_ldap_get_dn") -(define (ldap-message-dn session entry) - (or (ldap-get-dn-internal session entry) +(define (ldap-entry-dn session entry) + (or (ldap-get-dn-internal session (ldap-entry-message entry)) (raise-ldap-condition (ldap-get-error-return-object session) session))) ;;;