int num_retries = 0;
- Operation* ps_list;
- int rc;
- EntryInfo *suffix_ei = NULL;
- Entry *ctxcsn_e;
- int ctxcsn_added = 0;
-
LDAPControl **postread_ctrl = NULL;
LDAPControl *ctrls[SLAP_MAX_RESPONSE_CONTROLS];
int num_ctrls = 0;
bdb_cache_add( bdb, ei, e, &nrdn, locker );
- if ( suffix_ei == NULL ) {
- suffix_ei = BEI(e);
- }
-
if(( rs->sr_err=TXN_COMMIT( ltid, 0 )) != 0 ) {
rs->sr_text = "txn_commit failed";
} else {
*indexmask = a->ai_indexmask;
*cr = a->ai_cr;
} else {
- *indexmask = NULL;
+ *indexmask = 0;
*cr = NULL;
}
}
{
struct bdb_info *bdb = (struct bdb_info *) op->o_bd->be_private;
EntryInfo ei, eip, *ei2 = NULL, *ein = NULL, *eir = NULL;
- char ndn[SLAP_LDAPDN_MAXLEN];
- ID parent;
int rc;
int addlru = 1;
static int
bdb_txn_get( Operation *op, DB_ENV *env, DB_TXN **txn, int reset )
{
- int i, rc, lockid;
+ int i, rc;
void *ctx, *data = NULL;
/* If no op was provided, try to find the ctx anyway... */
int num_retries = 0;
- Operation* ps_list;
int rc;
- EntryInfo *suffix_ei;
- Entry *ctxcsn_e;
- int ctxcsn_added = 0;
LDAPControl **preread_ctrl = NULL;
LDAPControl *ctrls[SLAP_MAX_RESPONSE_CONTROLS];
ID *tmp,
ID *save )
{
- struct bdb_info *bdb = (struct bdb_info *) op->o_bd->be_private;
int rc = 0;
ComponentFilter *f;
ID *tmp,
ID *save )
{
- struct bdb_info *bdb = (struct bdb_info *) op->o_bd->be_private;
int rc = 0;
Filter *f;
DB *db = bdb->bi_id2entry->bdi_db;
DBT key, data;
struct berval bv;
- int rc = 0, ret = 0;
+ int rc = 0;
ID nid;
*e = NULL;
int rc;
DBT data;
DBC *cursor;
- ID lo, hi, tmp, nlo, nhi, nid;
+ ID lo, hi, nlo, nhi, nid;
char *err;
{
slap_mask_t mask )
{
int rc, i;
- const char *text;
DB *db;
struct berval *keys;
{
int rc;
slap_mask_t mask = 0;
-#ifdef LDAP_COMP_MATCH
- ComponentReference* cr_list, *cr;
- AttributeDescription *comp_ad;
-#endif
if( type->sat_sup ) {
/* recurse */
if( type->sat_ad ) {
#ifdef LDAP_COMP_MATCH
/* component indexing */
+ ComponentReference* cr_list, *cr;
+
bdb_attr_mask_cr( op->o_bd->be_private, type->sat_ad, &mask, &cr_list );
if ( cr_list ) {
for( cr = cr_list ; cr ; cr = cr->cr_next ) {
{
int rc;
struct bdb_info *bdb = (struct bdb_info *) be->be_private;
- Operation *ps = NULL;
- Operation *psn = NULL;
- void *saved_tmpmemctx = NULL;
/* close db environment */
if( bdb->bi_dbenv ) {
LDAPControl *ctrls[SLAP_MAX_RESPONSE_CONTROLS];
int num_ctrls = 0;
- Operation* ps_list;
- struct psid_entry *pm_list, *pm_prev;
int rc;
- EntryInfo *suffix_ei;
- Entry *ctxcsn_e;
- int ctxcsn_added = 0;
Debug( LDAP_DEBUG_ARGS, LDAP_XSTRING(bdb_modify) ": %s\n",
op->o_req_dn.bv_val, 0, 0 );
struct bdb_op_info opinfo = {0};
Entry dummy = {0};
- ID id;
-
Entry *np = NULL; /* newSuperior Entry */
struct berval *np_dn = NULL; /* newSuperior dn */
struct berval *np_ndn = NULL; /* newSuperior ndn */
LDAPControl *ctrls[SLAP_MAX_RESPONSE_CONTROLS];
int num_ctrls = 0;
- Operation *ps_list;
- struct psid_entry *pm_list, *pm_prev;
int rc;
- EntryInfo *suffix_ei;
- Entry *ctxcsn_e;
- int ctxcsn_added = 0;
int parent_is_glue = 0;
int parent_is_leaf = 0;
int bdb_last_id( BackendDB *be, DB_TXN *tid )
{
struct bdb_info *bdb = (struct bdb_info *) be->be_private;
- int i, rc;
+ int rc;
ID id = 0;
unsigned char idbuf[sizeof(ID)];
DBT key, data;
ID *lastid,
int tentries );
-static int bdb_pfid_cmp( const void *v_id1, const void *v_id2 );
-static ID* bdb_id_dup( Operation *op, ID *id );
-
/* Dereference aliases for a single alias entry. Return the final
* dereferenced entry on success, NULL on any failure.
*/
goto loop_begin;
}
-loop_start:
-
for ( id = bdb_idl_first( candidates, &cursor );
id != NOID ; id = bdb_idl_next( candidates, &cursor ) )
{
int scopeok = 0;
- ID* idhole = NULL;
loop_begin:
(void) ber_free_buf( ber );
}
-static int
-bdb_pfid_cmp( const void *v_id1, const void *v_id2 )
-{
- const ID *p1 = v_id1, *p2 = v_id2;
- return *p1 - *p2;
-}
-
-static ID*
-bdb_id_dup( Operation *op, ID *id )
-{
- ID *new;
- new = ch_malloc( sizeof(ID) );
- *new = *id;
- return new;
-}
struct berval *text,
int hole )
{
- struct bdb_info *bdb = (struct bdb_info *) op->o_bd->be_private;
struct berval dn = e->e_name;
struct berval ndn = e->e_nname;
struct berval pdn, npdn;