Skip to content
Snippets Groups Projects
Commit 00ba798b authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Left DN_INDICES defines by mistake... it's not ready for prime time yet.

Change prefixes to make eyeballing .dbb files easier
parent 1ffe5122
No related branches found
No related tags found
No related merge requests found
......@@ -24,11 +24,10 @@ LDAP_BEGIN_DECL
#define SUBLEN 3
#define DN_INDICES 1
/* #define DN_INDICES 1 *//* generate dn eq, subtree, and parent indices */
/* #undef DN_INDICES *//* generate dn eq, subtree, and parent indices */
#define DN_ENTRY_PREFIX '='
#define DN_SUBTREE_PREFIX '+'
#define DN_PARENT_PREFIX '-'
#define DN_SUBTREE_PREFIX '?'
#define DN_PARENT_PREFIX '@'
/*
* there is a single index for each attribute. these prefixes ensure
......@@ -42,7 +41,7 @@ LDAP_BEGIN_DECL
/* allow 3 characters per byte + PREFIX + EOS */
#define CONT_SIZE ( sizeof(long)*3 + 1 + 1 )
#undef CONT_POSTFIX /* postfix original key */
/* #undef CONT_POSTFIX *//* postfix original key */
#define UNKNOWN_PREFIX '?' /* prefix for unknown keys */
......
......@@ -79,7 +79,8 @@ dn2id_add(
for( i=0; subtree[i] != NULL; i++ ) {
key.dsize = strlen( subtree[i] ) + 2;
key.dptr = ch_malloc( key.dsize );
sprintf( key.dptr, "%c%s", DN_SUBTREE_PREFIX, subtree[i] );
sprintf( key.dptr, "%c%s",
DN_SUBTREE_PREFIX, subtree[i] );
rc = idl_insert_key( be, db, key, id );
......
......@@ -111,7 +111,8 @@ main( int argc, char **argv )
if( pdn != NULL ) {
key.dsize = strlen( pdn ) + 2;
key.dptr = ch_malloc( key.dsize );
sprintf( key.dptr, "%c%s", DN_PARENT_PREFIX, pdn );
sprintf( key.dptr, "%c%s",
DN_PARENT_PREFIX, pdn );
rc = idl_insert_key( be, db, key, id );
free( key.dptr );
}
......@@ -131,7 +132,8 @@ main( int argc, char **argv )
for( i=0; subtree[i] != NULL; i++ ) {
key.dsize = strlen( subtree[i] ) + 2;
key.dptr = ch_malloc( key.dsize );
sprintf( key.dptr, "%c%s", DN_SUBTREE_PREFIX, subtree[i] );
sprintf( key.dptr, "%c%s",
DN_SUBTREE_PREFIX, subtree[i] );
rc = idl_insert_key( be, db, key, id );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment