]> git.sur5r.net Git - openldap/commitdiff
Don't maintain a DN_SUBTREE index for the backend suffix.
authorHoward Chu <hyc@openldap.org>
Tue, 4 Dec 2001 00:10:47 +0000 (00:10 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 4 Dec 2001 00:10:47 +0000 (00:10 +0000)
servers/slapd/back-ldbm/dn2id.c

index 1375ac5b5eb6f9fe93b1cc60322e803c890c888c..f743046aa58d3ac22a91cd5e03899c4f4ce7c85a 100644 (file)
@@ -80,7 +80,7 @@ dn2id_add(
        }
 
        if ( rc != -1 ) {
-               char **subtree = dn_subtree( NULL, dn );
+               char **subtree = dn_subtree( be, dn );
 
                if( subtree != NULL ) {
                        int i;
@@ -225,6 +225,12 @@ dn2idl(
        assert( idlp != NULL );
        *idlp = NULL;
 
+       if ( prefix == DN_SUBTREE_PREFIX && be_issuffix(be, dn) ) {
+               *idlp = ch_malloc( sizeof(ID) );
+               **idlp = ID_BLOCK_ALLIDS_VALUE;
+               return 0;
+       }
+
        if ( (db = ldbm_cache_open( be, "dn2id", LDBM_SUFFIX, LDBM_WRCREAT ))
                == NULL ) {
 #ifdef NEW_LOGGING
@@ -309,7 +315,7 @@ dn2id_delete(
        }
 
        {
-               char **subtree = dn_subtree( NULL, dn );
+               char **subtree = dn_subtree( be, dn );
 
                if( subtree != NULL ) {
                        int i;