]> git.sur5r.net Git - openldap/commitdiff
small improvement and prototyping
authorPierangelo Masarati <ando@openldap.org>
Thu, 27 Dec 2001 15:15:30 +0000 (15:15 +0000)
committerPierangelo Masarati <ando@openldap.org>
Thu, 27 Dec 2001 15:15:30 +0000 (15:15 +0000)
servers/slapd/dn.c
servers/slapd/proto-slap.h

index 3f58041f36515b0c56b659d0edfe1771c2b4c20e..449808b3d14ca5a2dab225d971612b9f16796906 100644 (file)
@@ -819,7 +819,6 @@ rdn_attrs( const char * rdn, char ***types, char ***values)
        int             rc;
        
        assert( rdn );
-       assert( types );
        assert( values );
 
        rc = ldap_str2rdn( rdn, &tmpRDN, &p, LDAP_DN_FORMAT_LDAP );
@@ -834,8 +833,10 @@ rdn_attrs( const char * rdn, char ***types, char ***values)
                assert( ava->la_attr );
                assert( ava->la_value );
 
-               charray_add_n( types, ava->la_attr->bv_val, 
-                               ava->la_attr->bv_len );
+               if ( types ) {
+                       charray_add_n( types, ava->la_attr->bv_val, 
+                                       ava->la_attr->bv_len );
+               }
                charray_add_n( values, ava->la_value->bv_val, 
                                ava->la_value->bv_len );
        }
index 2402070bd4f4dd8c446c15be5bf26556d5c1087f..15cde0736dc92fa9f0772da2016375bead314573 100644 (file)
@@ -373,6 +373,9 @@ LDAP_SLAPD_F (int) dnMatch LDAP_P((
 LDAP_SLAPD_F (int) dnIsSuffix LDAP_P((
        const struct berval *dn, const struct berval *suffix ));
 
+LDAP_SLAPD_F (int) dnExtractRdn LDAP_P((
+       const char *dn, struct berval **rdn ));
+
 LDAP_SLAPD_F (int) rdnValidate LDAP_P(( struct berval * rdn ));
 
 #define SLAP_DN_MIGRATION