}
#ifndef BDB_MULTIPLE_SUFFIXES
- if( !be_issuffix( op->o_bd, &ptr )) {
+ if( !be_issuffix( op->o_bd, &ptr ))
#endif
+ {
buf[0] = DN_SUBTREE_PREFIX;
rc = db->put( db, txn, &key, &data, DB_NOOVERWRITE );
if( rc != 0 ) {
}
#ifdef BDB_MULTIPLE_SUFFIXES
- if( !be_issuffix( op->o_bd, &ptr )) {
+ if( !be_issuffix( op->o_bd, &ptr ))
#endif
+ {
dnParent( &ptr, &pdn );
key.size = pdn.bv_len + 2;
#endif
goto done;
}
-#ifndef BDB_MULTIPLE_SUFFIXES
}
+#ifndef BDB_MULTIPLE_SUFFIXES
while( !be_issuffix( op->o_bd, &ptr ))
#else
for (;;)
key.data = pdn.bv_val - 1;
ptr = pdn;
}
-#ifdef BDB_MULTIPLE_SUFFIXES
}
-#endif
done:
op->o_tmpfree( buf, op->o_tmpmemctx );
}
#ifndef BDB_MULTIPLE_SUFFIXES
- if( !be_issuffix( op->o_bd, &ptr )) {
+ if( !be_issuffix( op->o_bd, &ptr ))
#endif
+ {
buf[0] = DN_SUBTREE_PREFIX;
rc = db->del( db, txn, &key, 0 );
if( rc != 0 ) {
}
#ifdef BDB_MULTIPLE_SUFFIXES
- if( !be_issuffix( op->o_bd, &ptr )) {
+ if( !be_issuffix( op->o_bd, &ptr ))
#endif
+ {
dnParent( &ptr, &pdn );
key.size = pdn.bv_len + 2;
#endif
goto done;
}
-#ifndef BDB_MULTIPLE_SUFFIXES
}
- while( !be_issuffix( op->o_bd, &ptr )) {
+#ifndef BDB_MULTIPLE_SUFFIXES
+ while( !be_issuffix( op->o_bd, &ptr ))
#else
- for (;;) {
+ for (;;)
#endif
+ {
ptr.bv_val[-1] = DN_SUBTREE_PREFIX;
rc = bdb_idl_delete_key( op->o_bd, db, txn, &key, e->e_id );
key.data = pdn.bv_val - 1;
ptr = pdn;
}
-#ifdef BDB_MULTIPLE_SUFFIXES
}
-#endif
done:
op->o_tmpfree( buf, op->o_tmpmemctx );
op->o_tmpfree( key.data, op->o_tmpmemctx );
return rc;
}
-#else /* BDB_HIER */
+#else /* BDB_HIER */
/* Experimental management routines for a hierarchically structured database.
*
* Unsupported! Use at your own risk!
hdb_dup_compare(
DB *db,
const DBT *usrkey,
- const DBT *curkey
-)
+ const DBT *curkey )
{
char *u = (char *)&(((diskNode *)(usrkey->data))->nrdnlen);
char *c = (char *)&(((diskNode *)(curkey->data))->nrdnlen);
*/
int hdb_fix_dn(
Entry *e,
- int checkit
-)
+ int checkit )
{
EntryInfo *ei;
int rlen = 0, nrlen = 0;
* hdb_cache_load will copy them as needed
*/
ei.bei_nrdn.bv_val = d->nrdn;
- ei.bei_rdn.bv_len = len - sizeof(diskNode) - ei.bei_nrdn.bv_len;
+ ei.bei_rdn.bv_len = len - sizeof(diskNode)
+ - ei.bei_nrdn.bv_len;
ei.bei_rdn.bv_val = d->nrdn + ei.bei_nrdn.bv_len + 1;
bdb_idl_insert( cx->tmp, ei.bei_id );
hdb_cache_load( cx->bdb, &ei, &ei2 );
*/
cx->rc = 0;
if ( cx->ei->bei_ckids > 0 ) {
-
/* Walk the kids tree; order is irrelevant since bdb_idl_insert
* will insert in sorted order.
*/
- avl_apply( cx->ei->bei_kids, apply_func, cx->tmp, -1, AVL_POSTORDER );
+ avl_apply( cx->ei->bei_kids, apply_func,
+ cx->tmp, -1, AVL_POSTORDER );
}
bdb_cache_entryinfo_unlock( cx->ei );
}
LDAP_LOG ( INDEX, ARGS,
"=> hdb_dn2ididl( \"%s\" )\n", e->e_nname.bv_val, 0, 0 );
#else
- Debug( LDAP_DEBUG_TRACE, "=> hdb_dn2idl( \"%s\" )\n", e->e_nname.bv_val, 0, 0 );
+ Debug( LDAP_DEBUG_TRACE, "=> hdb_dn2idl( \"%s\" )\n",
+ e->e_nname.bv_val, 0, 0 );
#endif
#ifndef BDB_MULTIPLE_SUFFIXES