]> git.sur5r.net Git - openldap/commitdiff
Changed Filter.f_dn to struct berval*
authorHoward Chu <hyc@openldap.org>
Wed, 26 Dec 2001 23:37:59 +0000 (23:37 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 26 Dec 2001 23:37:59 +0000 (23:37 +0000)
servers/slapd/back-bdb/search.c
servers/slapd/back-ldbm/dn2id.c
servers/slapd/back-ldbm/proto-back-ldbm.h
servers/slapd/back-ldbm/search.c
servers/slapd/slap.h

index 66772e42a49f508524fdb1d6b32ff18120f83b85..4fe8393a24eab562010ba97d217463832a5dd535 100644 (file)
@@ -560,7 +560,7 @@ static int search_candidates(
        fand.f_choice = scope == LDAP_SCOPE_SUBTREE
                ? SLAPD_FILTER_DN_SUBTREE
                : SLAPD_FILTER_DN_ONE;
-       fand.f_dn = e->e_ndn;
+       fand.f_dn = &e->e_nname;
        fand.f_next = xf.f_or == filter ? filter : &xf ;
 
 
index 2092b46f39c08943718068fb7f6dc295508c6dda..14f108753bac2eef67deab89194d807c86b8ae9b 100644 (file)
@@ -208,7 +208,7 @@ dn2id(
 int
 dn2idl(
     Backend    *be,
-    const char *dn,
+    struct berval      *dn,
     int                prefix,
     ID_BLOCK    **idlp
 )
@@ -218,15 +218,15 @@ dn2idl(
 
 #ifdef NEW_LOGGING
        LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
-                  "dn2idl: \"%c%s\"\n", prefix, dn ));
+                  "dn2idl: \"%c%s\"\n", prefix, dn->bv_val ));
 #else
-       Debug( LDAP_DEBUG_TRACE, "=> dn2idl( \"%c%s\" )\n", prefix, dn, 0 );
+       Debug( LDAP_DEBUG_TRACE, "=> dn2idl( \"%c%s\" )\n", prefix, dn->bv_val, 0 );
 #endif
 
        assert( idlp != NULL );
        *idlp = NULL;
 
-       if ( prefix == DN_SUBTREE_PREFIX && be_issuffix(be, dn) ) {
+       if ( prefix == DN_SUBTREE_PREFIX && be_issuffix(be, dn->bv_val) ) {
                *idlp = ch_malloc( sizeof(ID) );
                **idlp = ID_BLOCK_ALLIDS_VALUE;
                return 0;
@@ -247,9 +247,9 @@ dn2idl(
 
        ldbm_datum_init( key );
 
-       key.dsize = strlen( dn ) + 2;
+       key.dsize = dn->bv_len + 2;
        key.dptr = ch_malloc( key.dsize );
-       sprintf( key.dptr, "%c%s", prefix, dn );
+       sprintf( key.dptr, "%c%s", prefix, dn->bv_val );
 
        *idlp = idl_fetch( be, db, key );
 
index 43a3be30156bacd4b9c72404e697acedb7314464..703621932fa01e0a3dd287ef0b148539944fc6e5 100644 (file)
@@ -80,7 +80,7 @@ void *ldbm_cache_sync_daemon LDAP_P(( void *));
 
 int dn2id_add LDAP_P(( Backend *be, const char *dn, ID id ));
 int dn2id LDAP_P(( Backend *be, const char *dn, ID *idp ));
-int dn2idl LDAP_P(( Backend *be, const char *dn, int prefix, ID_BLOCK **idlp ));
+int dn2idl LDAP_P(( Backend *be, struct berval *dn, int prefix, ID_BLOCK **idlp ));
 int dn2id_delete LDAP_P(( Backend *be, const char *dn, ID id ));
 
 Entry * dn2entry_rw LDAP_P(( Backend *be, const char *dn, Entry **matched, int rw ));
index 89caf85928f2bc1e45e62d5ac0e9d2dd60fc1395..6ba0b67afa3a20444680677ef8b6c30bba41c4e1 100644 (file)
@@ -598,7 +598,7 @@ search_candidates(
        fand.f_choice = scope == LDAP_SCOPE_SUBTREE
                ? SLAPD_FILTER_DN_SUBTREE
                : SLAPD_FILTER_DN_ONE;
-       fand.f_dn = e->e_ndn;
+       fand.f_dn = &e->e_nname;
        fand.f_next = xf.f_or == filter ? filter : &xf ;
 
        candidates = filter_candidates( be, &f );
index fdddcc287098063c906e0f94eed1746036234aa0..542eca40940433b9e5299eef4e51865fe71aecfd 100644 (file)
@@ -565,7 +565,7 @@ typedef struct slap_filter {
                ber_int_t f_un_result;
 
                /* DN */
-               char *f_un_dn;
+               struct berval *f_un_dn;
 
                /* present */
                AttributeDescription *f_un_desc;