]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldap/attribute.c
Cleanup up LDAP_CLIENT_UPDATE code... including some bug fixing.
[openldap] / servers / slapd / back-ldap / attribute.c
index 0fec6c5e804c1f55596ba5dc16ac9b3ad8ff96c9..8c115f9b01c5b26564d099bdc3145682c4f045f4 100644 (file)
@@ -27,13 +27,13 @@ ldap_back_attribute(
        Entry   *target,
        struct berval   *ndn,
        AttributeDescription *entry_at,
-       BVarray *vals
+       BerVarray *vals
 )
 {
        struct ldapinfo *li = (struct ldapinfo *) be->be_private;    
        int rc = 1, i, j, count, is_oc;
        Attribute *attr = NULL;
-       BVarray abv, v;
+       BerVarray abv, v;
        struct berval mapped = { 0, NULL };
        char **vs = NULL;
        LDAPMessage     *result = NULL, *e = NULL;
@@ -41,14 +41,14 @@ ldap_back_attribute(
        LDAP *ld = NULL;
 
        *vals = NULL;
-       if (target != NULL && dn_cmp( &target->e_nname, ndn )) {
+       if (target != NULL && dn_match( &target->e_nname, ndn )) {
                /* we already have a copy of the entry */
                /* attribute and objectclass mapping has already been done */
                if ((attr = attr_find(target->e_attrs, entry_at)) == NULL)
                        return(1);
 
                for ( count = 0; attr->a_vals[count].bv_val != NULL; count++ ) { }
-               v = (BVarray) ch_calloc( (count + 1), sizeof(struct berval) );
+               v = (BerVarray) ch_calloc( (count + 1), sizeof(struct berval) );
                if (v != NULL) {
                        for ( j = 0, abv = attr->a_vals; --count >= 0; abv++ ) {
                                if ( abv->bv_len > 0 ) {
@@ -95,7 +95,7 @@ ldap_back_attribute(
        }
 
        for ( count = 0; vs[count] != NULL; count++ ) { }
-       v = (BVarray) ch_calloc( (count + 1), sizeof(struct berval) );
+       v = (BerVarray) ch_calloc( (count + 1), sizeof(struct berval) );
        if (v == NULL) {
                goto cleanup;
        }