Skip to content
Snippets Groups Projects
Commit 79f3ea6e authored by Howard Chu's avatar Howard Chu
Browse files

BDB_HIER was defined by accident, undef

Fix up for SLAP_NVALUES_ON_DISK
parent 2d78fafe
Branches
Tags
No related merge requests found
......@@ -14,7 +14,7 @@
LDAP_BEGIN_DECL
#define BDB_HIER 1
/* #define BDB_HIER 1 */
#define DN_BASE_PREFIX SLAP_INDEX_EQUALITY_PREFIX
#define DN_ONE_PREFIX '%'
......
......@@ -24,13 +24,14 @@ int bdb_id2entry_put(
struct berval bv;
int rc;
#ifdef BDB_HIER
char *odn, *ondn;
struct berval odn, ondn;
/* We only store rdns, and they go in the id2parent database. */
odn = e->e_dn; ondn = e->e_ndn;
odn = e->e_name; ondn = e->e_nname;
e->e_dn = ""; e->e_ndn = "";
e->e_name = slap_empty_bv;
e->e_nname = slap_empty_bv;
#endif
DBTzero( &key );
key.data = (char *) &e->e_id;
......@@ -38,7 +39,7 @@ int bdb_id2entry_put(
rc = entry_encode( e, &bv );
#ifdef BDB_HIER
e->e_dn = odn; e->e_ndn = ondn;
e->e_name = odn; e->e_nname = ondn;
#endif
if( rc != LDAP_SUCCESS ) {
return -1;
......@@ -204,7 +205,7 @@ int bdb_entry_return(
if( (void *) e->e_attrs != (void *) (e+1)) {
attrs_free( e->e_attrs );
}
#ifdef SLAP_NVALUES
#if defined(SLAP_NVALUES) && !defined(SLAP_NVALUES_ON_DISK)
else {
/* nvals are not contiguous with the rest. oh well. */
Attribute *a;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment