]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-meta/attribute.c
Fix typo
[openldap] / servers / slapd / back-meta / attribute.c
index 02fa629324c8664993d1de6e1d757f4be02e2819..ec8df2e026e2366f9b325d432b7773a8d6fd57fc 100644 (file)
@@ -91,13 +91,13 @@ meta_back_attribute(
                Entry                   *target,
                struct berval           *ndn,
                AttributeDescription    *entry_at,
-               BVarray                 *vals
+               BerVarray                       *vals
 )
 {
        struct metainfo *li = ( struct metainfo * )be->be_private;    
        int rc = 1, i, j, count, is_oc, candidate;
        Attribute *attr;
-       BVarray abv, v;
+       BerVarray abv, v;
        char **vs; 
        struct berval   mapped;
        LDAPMessage     *result, *e;
@@ -105,8 +105,7 @@ meta_back_attribute(
        LDAP *ld;
 
        *vals = NULL;
-       if ( target != NULL && target->e_nname.bv_len == ndn->bv_len
-                       && strcmp( target->e_ndn, ndn->bv_val ) == 0 ) {
+       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 */
                attr = attr_find( target->e_attrs, entry_at );
@@ -116,7 +115,7 @@ meta_back_attribute(
 
                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 ) {
                        return 1;
                }
@@ -167,7 +166,7 @@ meta_back_attribute(
                        if ( vs != NULL ) {
                                for ( count = 0; vs[ count ] != NULL;
                                                count++ ) { }
-                               v = ( BVarray )ch_calloc( ( count + 1 ),
+                               v = ( BerVarray )ch_calloc( ( count + 1 ),
                                                sizeof( struct berval ) );
                                if ( v == NULL ) {
                                        ldap_value_free( vs );