From 246f7e8929331902e875d1c1f97cdb5299019011 Mon Sep 17 00:00:00 2001 From: eknauel Date: Mon, 16 Feb 2004 08:33:13 +0000 Subject: [PATCH] + changed ldap-modify to use the new representation of LDAPMod records + added ldap-add --- scheme/ldap.scm | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/scheme/ldap.scm b/scheme/ldap.scm index d8239f1..8fe2b79 100644 --- a/scheme/ldap.scm +++ b/scheme/ldap.scm @@ -568,20 +568,26 @@ (define (ldap-modify dn ldap-modifications . args) (let-optionals args ((session (current-ldap-session))) - (let ((vec (if (list? ldap-modifications) - (list->vector ldap-modifications) - (vector ldap-modifications)))) - (let ((ret-obj - (convert-ldap-return-code (ldap-modify-internal session dn vec)))) - (or (ldap-success? ret-obj) - (raise-ldap-condition ret-obj session)))))) + (let ((ret-obj + (convert-ldap-return-code + (ldap-modify-internal session dn ldap-modifications)))) + (or (ldap-success? ret-obj) + (raise-ldap-condition ret-obj session))))) ;;; (import-lambda-definition ldap-add-internal - (session dn ldap-modification-vector) + (session dn ldap-modifications) "scsh_ldap_add") +(define (ldap-add dn ldap-modifications . args) + (let-optionals args ((session (current-ldap-session))) + (let ((ret-obj + (convert-ldap-return-code + (ldap-add-internal session dn ldap-modifications)))) + (or (ldap-success? ret-obj) + (raise-ldap-condition ret-obj session))))) + (import-lambda-definition ldap-delete-internal (session dn) "scsh_ldap_delete")