LDAPControl *ctrls[SLAP_MAX_RESPONSE_CONTROLS];
int num_ctrls = 0;
- Debug(LDAP_DEBUG_ARGS, "==> bdb_add: %s\n",
+ Debug(LDAP_DEBUG_ARGS, "==> " LDAP_XSTRING(bdb_add) ": %s\n",
op->oq_add.rs_e->e_name.bv_val, 0, 0);
ctrls[num_ctrls] = 0;
NULL, &rs->sr_text, textbuf, textlen );
if ( rs->sr_err != LDAP_SUCCESS ) {
Debug( LDAP_DEBUG_TRACE,
- "bdb_add: entry failed schema check: %s (%d)\n",
- rs->sr_text, rs->sr_err, 0 );
+ LDAP_XSTRING(bdb_add) ": entry failed schema check: "
+ "%s (%d)\n", rs->sr_text, rs->sr_err, 0 );
goto return_results;
}
rs->sr_err = bdb_next_id( op->o_bd, NULL, &op->oq_add.rs_e->e_id );
if( rs->sr_err != 0 ) {
Debug( LDAP_DEBUG_TRACE,
- "bdb_add: next_id failed (%d)\n", rs->sr_err, 0, 0 );
+ LDAP_XSTRING(bdb_add) ": next_id failed (%d)\n",
+ rs->sr_err, 0, 0 );
rs->sr_err = LDAP_OTHER;
rs->sr_text = "internal error";
goto return_results;
rs->sr_text = NULL;
if( rs->sr_err != 0 ) {
Debug( LDAP_DEBUG_TRACE,
- "bdb_add: txn_begin failed: %s (%d)\n",
+ LDAP_XSTRING(bdb_add) ": txn_begin failed: %s (%d)\n",
db_strerror(rs->sr_err), rs->sr_err, 0 );
rs->sr_err = LDAP_OTHER;
rs->sr_text = "internal error";
: NULL;
bdb_unlocked_cache_return_entry_r( &bdb->bi_cache, p );
p = NULL;
- Debug( LDAP_DEBUG_TRACE, "bdb_add: parent does not exist\n",
- 0, 0, 0 );
+ Debug( LDAP_DEBUG_TRACE,
+ LDAP_XSTRING(bdb_add) ": parent "
+ "does not exist\n", 0, 0, 0 );
rs->sr_err = LDAP_REFERRAL;
send_ldap_result( op, rs );
}
Debug( LDAP_DEBUG_TRACE,
- "bdb_add: no write access to parent\n", 0, 0, 0 );
+ LDAP_XSTRING(bdb_add) ": no write access "
+ "to parent\n", 0, 0, 0 );
rs->sr_err = LDAP_INSUFFICIENT_ACCESS;
rs->sr_text = "no write access to parent";
goto return_results;;
#ifdef BDB_SUBENTRIES
if ( is_entry_subentry( p ) ) {
/* parent is a subentry, don't allow add */
- Debug( LDAP_DEBUG_TRACE, "bdb_add: parent is subentry\n",
+ Debug( LDAP_DEBUG_TRACE,
+ LDAP_XSTRING(bdb_add) ": parent is subentry\n",
0, 0, 0 );
rs->sr_err = LDAP_OBJECT_CLASS_VIOLATION;
rs->sr_text = "parent is a subentry";
#endif
if ( is_entry_alias( p ) ) {
/* parent is an alias, don't allow add */
- Debug( LDAP_DEBUG_TRACE, "bdb_add: parent is alias\n",
+ Debug( LDAP_DEBUG_TRACE,
+ LDAP_XSTRING(bdb_add) ": parent is alias\n",
0, 0, 0 );
rs->sr_err = LDAP_ALIAS_PROBLEM;
rs->sr_text = "parent is an alias";
rs->sr_matched = p->e_name.bv_val;
rs->sr_ref = get_entry_referrals( op, p );
- Debug( LDAP_DEBUG_TRACE, "bdb_add: parent is referral\n",
+ Debug( LDAP_DEBUG_TRACE,
+ LDAP_XSTRING(bdb_add) ": parent is referral\n",
0, 0, 0 );
rs->sr_err = LDAP_REFERRAL;
if ((( !be_isroot( op ) && !be_shadow_update(op) )
|| pdn.bv_len > 0 ) && !is_entry_glue( op->oq_add.rs_e ))
{
- Debug( LDAP_DEBUG_TRACE, "bdb_add: %s denied\n",
+ Debug( LDAP_DEBUG_TRACE,
+ LDAP_XSTRING(bdb_add) ": %s denied\n",
pdn.bv_len == 0 ? "suffix" : "entry at root",
0, 0 );
rs->sr_err = LDAP_NO_SUCH_OBJECT;
goto retry;
}
- Debug( LDAP_DEBUG_TRACE, "bdb_add: no write access to entry\n",
+ Debug( LDAP_DEBUG_TRACE,
+ LDAP_XSTRING(bdb_add) ": no write access to entry\n",
0, 0, 0 );
rs->sr_err = LDAP_INSUFFICIENT_ACCESS;
rs->sr_text = "no write access to entry";
rs->sr_text = NULL;
if( rs->sr_err != 0 ) {
Debug( LDAP_DEBUG_TRACE,
- "bdb_add: txn_begin(2) failed: %s (%d)\n",
- db_strerror(rs->sr_err), rs->sr_err, 0 );
+ LDAP_XSTRING(bdb_add) ": txn_begin(2) failed: "
+ "%s (%d)\n", db_strerror(rs->sr_err), rs->sr_err, 0 );
rs->sr_err = LDAP_OTHER;
rs->sr_text = "internal error";
goto return_results;
/* dn2id index */
rs->sr_err = bdb_dn2id_add( op, lt2, ei, op->oq_add.rs_e );
if ( rs->sr_err != 0 ) {
- Debug( LDAP_DEBUG_TRACE, "bdb_add: dn2id_add failed: %s (%d)\n",
+ Debug( LDAP_DEBUG_TRACE,
+ LDAP_XSTRING(bdb_add) ": dn2id_add failed: %s (%d)\n",
db_strerror(rs->sr_err), rs->sr_err, 0 );
switch( rs->sr_err ) {
/* id2entry index */
rs->sr_err = bdb_id2entry_add( op->o_bd, lt2, op->oq_add.rs_e );
if ( rs->sr_err != 0 ) {
- Debug( LDAP_DEBUG_TRACE, "bdb_add: id2entry_add failed\n",
+ Debug( LDAP_DEBUG_TRACE,
+ LDAP_XSTRING(bdb_add) ": id2entry_add failed\n",
0, 0, 0 );
switch( rs->sr_err ) {
case DB_LOCK_DEADLOCK:
/* attribute indexes */
rs->sr_err = bdb_index_entry_add( op, lt2, op->oq_add.rs_e );
if ( rs->sr_err != LDAP_SUCCESS ) {
- Debug( LDAP_DEBUG_TRACE, "bdb_add: index_entry_add failed\n",
+ Debug( LDAP_DEBUG_TRACE,
+ LDAP_XSTRING(bdb_add) ": index_entry_add failed\n",
0, 0, 0 );
switch( rs->sr_err ) {
case DB_LOCK_DEADLOCK:
&slap_post_read_bv, postread_ctrl ) )
{
Debug( LDAP_DEBUG_TRACE,
- "<=- bdb_add: post-read failed!\n", 0, 0, 0 );
+ "<=- " LDAP_XSTRING(bdb_add) ": post-read "
+ "failed!\n", 0, 0, 0 );
goto return_results;
}
}
rc = bdb_psearch( op, rs, ps_list, e, LDAP_PSEARCH_BY_ADD );
if ( rc ) {
Debug( LDAP_DEBUG_TRACE,
- "bdb_add: persistent search failed (%d,%d)\n",
+ LDAP_XSTRING(bdb_add)
+ ": persistent search failed "
+ "(%d,%d)\n",
rc, rs->sr_err, 0 );
}
}
op->o_private = NULL;
if ( rs->sr_err != LDAP_SUCCESS ) {
- Debug( LDAP_DEBUG_TRACE, "bdb_add: %s : %s (%d)\n",
+ Debug( LDAP_DEBUG_TRACE,
+ LDAP_XSTRING(bdb_add) ": %s : %s (%d)\n",
rs->sr_text, db_strerror(rs->sr_err), rs->sr_err );
rs->sr_err = LDAP_OTHER;
goto return_results;
}
- Debug(LDAP_DEBUG_TRACE, "bdb_add: added%s id=%08lx dn=\"%s\"\n",
+ Debug(LDAP_DEBUG_TRACE,
+ LDAP_XSTRING(bdb_add) ": added%s id=%08lx dn=\"%s\"\n",
op->o_noop ? " (no-op)" : "",
op->oq_add.rs_e->e_id, op->oq_add.rs_e->e_dn );
DB_LOCK lock;
Debug( LDAP_DEBUG_ARGS,
- "==> bdb_bind: dn: %s\n", op->o_req_dn.bv_val, 0, 0);
+ "==> " LDAP_XSTRING(bdb_bind) ": dn: %s\n",
+ op->o_req_dn.bv_val, 0, 0);
/* allow noauth binds */
if ( op->oq_bind.rb_method == LDAP_AUTH_SIMPLE && be_isroot_pw( op )) {
rs->sr_err = bdb_next_id( op->o_bd, tid, &ctxcsn_id );
if ( rs->sr_err != 0 ) {
Debug( LDAP_DEBUG_TRACE,
- "bdb_add: next_id failed (%d)\n", rs->sr_err, 0, 0 );
+ "bdb_csn_commit: next_id failed (%d)\n",
+ rs->sr_err, 0, 0 );
rs->sr_err = LDAP_OTHER;
rs->sr_text = "internal error";
return BDB_CSN_ABORT;
ctrls[num_ctrls] = 0;
- Debug( LDAP_DEBUG_ARGS, "==> bdb_delete: %s\n",
+ Debug( LDAP_DEBUG_ARGS, "==> " LDAP_XSTRING(bdb_delete) ": %s\n",
op->o_req_dn.bv_val, 0, 0 );
build_new_dn( &ctxcsn_ndn, &op->o_bd->be_nsuffix[0],
bdb_unlocked_cache_return_entry_r(&bdb->bi_cache, p);
p = NULL;
}
- Debug( LDAP_DEBUG_TRACE, "==> bdb_delete: retrying...\n",
+ Debug( LDAP_DEBUG_TRACE,
+ "==> " LDAP_XSTRING(bdb_delete) ": retrying...\n",
0, 0, 0 );
rs->sr_err = TXN_ABORT( ltid );
ltid = NULL;
rs->sr_text = NULL;
if( rs->sr_err != 0 ) {
Debug( LDAP_DEBUG_TRACE,
- "bdb_delete: txn_begin failed: %s (%d)\n",
- db_strerror(rs->sr_err), rs->sr_err, 0 );
+ LDAP_XSTRING(bdb_delete) ": txn_begin failed: "
+ "%s (%d)\n", db_strerror(rs->sr_err), rs->sr_err, 0 );
rs->sr_err = LDAP_OTHER;
rs->sr_text = "internal error";
goto return_results;
BerVarray deref = NULL;
Debug( LDAP_DEBUG_ARGS,
- "<=- bdb_delete: no such object %s\n",
+ "<=- " LDAP_XSTRING(bdb_delete) ": no such object %s\n",
op->o_req_dn.bv_val, 0, 0);
if ( matched != NULL ) {
if ( pdn.bv_len != 0 ) {
if( p == NULL || !bvmatch( &pdn, &p->e_nname )) {
Debug( LDAP_DEBUG_TRACE,
- "<=- bdb_delete: parent does not exist\n",
- 0, 0, 0);
+ "<=- " LDAP_XSTRING(bdb_delete) ": parent "
+ "does not exist\n", 0, 0, 0 );
rs->sr_err = LDAP_OTHER;
rs->sr_text = "could not locate parent of entry";
goto return_results;
}
Debug( LDAP_DEBUG_TRACE,
- "<=- bdb_delete: no write access to parent\n",
- 0, 0, 0 );
+ "<=- " LDAP_XSTRING(bdb_delete) ": no write "
+ "access to parent\n", 0, 0, 0 );
rs->sr_err = LDAP_INSUFFICIENT_ACCESS;
rs->sr_text = "no write access to parent";
goto return_results;
}
Debug( LDAP_DEBUG_TRACE,
- "<=- bdb_delete: no access "
- "to parent\n", 0, 0, 0 );
+ "<=- " LDAP_XSTRING(bdb_delete)
+ ": no access to parent\n",
+ 0, 0, 0 );
rs->sr_err = LDAP_INSUFFICIENT_ACCESS;
rs->sr_text = "no write access to parent";
goto return_results;
} else {
Debug( LDAP_DEBUG_TRACE,
- "<=- bdb_delete: no parent "
- "and not root\n", 0, 0, 0);
+ "<=- " LDAP_XSTRING(bdb_delete)
+ ": no parent and not root\n", 0, 0, 0 );
rs->sr_err = LDAP_INSUFFICIENT_ACCESS;
goto return_results;
}
}
Debug( LDAP_DEBUG_TRACE,
- "<=- bdb_delete: no write access to entry\n",
- 0, 0, 0 );
+ "<=- " LDAP_XSTRING(bdb_delete) ": no write access "
+ "to entry\n", 0, 0, 0 );
rs->sr_err = LDAP_INSUFFICIENT_ACCESS;
rs->sr_text = "no write access to entry";
goto return_results;
rs->sr_ref = get_entry_referrals( op, e );
Debug( LDAP_DEBUG_TRACE,
- "bdb_delete: entry is referral\n", 0, 0, 0 );
+ LDAP_XSTRING(bdb_delete) ": entry is referral\n",
+ 0, 0, 0 );
rs->sr_err = LDAP_REFERRAL;
rs->sr_matched = e->e_name.bv_val;
&slap_pre_read_bv, preread_ctrl ) )
{
Debug( LDAP_DEBUG_TRACE,
- "<=- bdb_delete: pre-read failed!\n", 0, 0, 0 );
+ "<=- " LDAP_XSTRING(bdb_delete) ": pre-read "
+ "failed!\n", 0, 0, 0 );
goto return_results;
}
}
rs->sr_text = NULL;
if( rs->sr_err != 0 ) {
Debug( LDAP_DEBUG_TRACE,
- "bdb_delete: txn_begin(2) failed: %s (%d)\n",
- db_strerror(rs->sr_err), rs->sr_err, 0 );
+ LDAP_XSTRING(bdb_delete) ": txn_begin(2) failed: "
+ "%s (%d)\n", db_strerror(rs->sr_err), rs->sr_err, 0 );
rs->sr_err = LDAP_OTHER;
rs->sr_text = "internal error";
goto return_results;
goto retry;
case 0:
Debug(LDAP_DEBUG_ARGS,
- "<=- bdb_delete: non-leaf %s\n",
+ "<=- " LDAP_XSTRING(bdb_delete)
+ ": non-leaf %s\n",
op->o_req_dn.bv_val, 0, 0);
rs->sr_err = LDAP_NOT_ALLOWED_ON_NONLEAF;
rs->sr_text = "subtree delete not supported";
break;
default:
Debug(LDAP_DEBUG_ARGS,
- "<=- bdb_delete: has_children failed: %s (%d)\n",
+ "<=- " LDAP_XSTRING(bdb_delete)
+ ": has_children failed: %s (%d)\n",
db_strerror(rs->sr_err), rs->sr_err, 0 );
rs->sr_err = LDAP_OTHER;
rs->sr_text = "internal error";
goto retry;
} else if ( rc ) {
Debug( LDAP_DEBUG_TRACE,
- "bdb_delete: persistent search failed (%d,%d)\n",
- rc, rs->sr_err, 0 );
+ LDAP_XSTRING(bdb_delete) ": persistent search "
+ "failed (%d,%d)\n", rc, rs->sr_err, 0 );
}
}
ldap_pvt_thread_rdwr_wunlock( &bdb->bi_pslist_rwlock );
rs->sr_err = bdb_dn2id_delete( op, lt2, eip, e );
if ( rs->sr_err != 0 ) {
Debug(LDAP_DEBUG_TRACE,
- "<=- bdb_delete: dn2id failed: %s (%d)\n",
- db_strerror(rs->sr_err), rs->sr_err, 0 );
+ "<=- " LDAP_XSTRING(bdb_delete) ": dn2id failed: "
+ "%s (%d)\n", db_strerror(rs->sr_err), rs->sr_err, 0 );
switch( rs->sr_err ) {
case DB_LOCK_DEADLOCK:
case DB_LOCK_NOTGRANTED:
rs->sr_err = bdb_id2entry_delete( op->o_bd, lt2, e );
if ( rs->sr_err != 0 ) {
Debug(LDAP_DEBUG_TRACE,
- "<=- bdb_delete: id2entry failed: %s (%d)\n",
- db_strerror(rs->sr_err), rs->sr_err, 0 );
+ "<=- " LDAP_XSTRING(bdb_delete) ": id2entry failed: "
+ "%s (%d)\n", db_strerror(rs->sr_err), rs->sr_err, 0 );
switch( rs->sr_err ) {
case DB_LOCK_DEADLOCK:
case DB_LOCK_NOTGRANTED:
rs->sr_err = bdb_index_entry_del( op, lt2, e );
if ( rs->sr_err != LDAP_SUCCESS ) {
Debug( LDAP_DEBUG_TRACE,
- "<=- bdb_delete: index failed: %s (%d)\n",
- db_strerror(rs->sr_err), rs->sr_err, 0 );
+ "<=- " LDAP_XSTRING(bdb_delete) ": index failed: "
+ "%s (%d)\n", db_strerror(rs->sr_err), rs->sr_err, 0 );
switch( rs->sr_err ) {
case DB_LOCK_DEADLOCK:
case DB_LOCK_NOTGRANTED:
break;
default:
Debug(LDAP_DEBUG_ARGS,
- "<=- bdb_delete: has_children failed: %s (%d)\n",
+ "<=- " LDAP_XSTRING(bdb_delete)
+ ": has_children failed: %s (%d)\n",
db_strerror(rs->sr_err), rs->sr_err, 0 );
rs->sr_err = LDAP_OTHER;
rs->sr_text = "internal error";
rc = bdb_psearch( op, rs, ps_list, e, LDAP_PSEARCH_BY_DELETE );
if ( rc ) {
Debug( LDAP_DEBUG_TRACE,
- "bdb_delete: persistent search failed (%d,%d)\n",
+ LDAP_XSTRING(bdb_delete)
+ ": persistent search failed "
+ "(%d,%d)\n",
rc, rs->sr_err, 0 );
}
}
if( rs->sr_err != 0 ) {
Debug( LDAP_DEBUG_TRACE,
- "bdb_delete: txn_%s failed: %s (%d)\n",
+ LDAP_XSTRING(bdb_delete) ": txn_%s failed: %s (%d)\n",
op->o_noop ? "abort (no-op)" : "commit",
db_strerror(rs->sr_err), rs->sr_err );
rs->sr_err = LDAP_OTHER;
}
Debug( LDAP_DEBUG_TRACE,
- "bdb_delete: deleted%s id=%08lx dn=\"%s\"\n",
+ LDAP_XSTRING(bdb_delete) ": deleted%s id=%08lx dn=\"%s\"\n",
op->o_noop ? " (no-op)" : "",
eid, op->o_req_dn.bv_val );
rs->sr_err = LDAP_SUCCESS;
struct bdb_info *bdb;
Debug( LDAP_DEBUG_ANY,
- "bdb_db_init: Initializing %s database\n",
- be->bd_info->bi_type, 0, 0 );
+ LDAP_XSTRING(bdb_db_init) ": Initializing "
+ BDB_UCTYPE " database\n", 0, 0, 0 );
/* allocate backend-database-specific stuff */
bdb = (struct bdb_info *) ch_calloc( 1, sizeof(struct bdb_info) );
};
/* initialize the underlying database system */
- Debug( LDAP_DEBUG_TRACE, "bdb_back_initialize: initialize BDB backend\n",
- 0, 0, 0 );
+ Debug( LDAP_DEBUG_TRACE,
+ LDAP_XSTRING(bdb_back_initialize) ": initialize "
+ BDB_UCTYPE " backend\n", 0, 0, 0 );
bi->bi_flags |=
SLAP_BFLAG_INCREMENT |
if( ver < DB_VERSION_FULL )
{
Debug( LDAP_DEBUG_ANY,
- "bdb_back_initialize: BDB library version mismatch:"
+ LDAP_XSTRING(bdb_back_initialize) ": "
+ "BDB library version mismatch:"
" expected " DB_VERSION_STRING ","
" got %s\n", version, 0, 0 );
}
- Debug( LDAP_DEBUG_ANY, "bdb_back_initialize: %s\n",
- version, 0, 0 );
+ Debug( LDAP_DEBUG_ANY, LDAP_XSTRING(bdb_back_initialize)
+ ": %s\n", version, 0, 0 );
}
db_env_set_func_free( ber_memfree );
Entry *ctxcsn_e;
int ctxcsn_added = 0;
- Debug( LDAP_DEBUG_ARGS, "bdb_modify: %s\n",
+ Debug( LDAP_DEBUG_ARGS, LDAP_XSTRING(bdb_modify) ": %s\n",
op->o_req_dn.bv_val, 0, 0 );
ctrls[num_ctrls] = NULL;
e = NULL;
}
Debug(LDAP_DEBUG_TRACE,
- "bdb_modify: retrying...\n", 0, 0, 0);
+ LDAP_XSTRING(bdb_modify) ": retrying...\n", 0, 0, 0);
pm_list = LDAP_LIST_FIRST(&op->o_pm_list);
while ( pm_list != NULL ) {
rs->sr_text = NULL;
if( rs->sr_err != 0 ) {
Debug( LDAP_DEBUG_TRACE,
- "bdb_modify: txn_begin failed: %s (%d)\n",
- db_strerror(rs->sr_err), rs->sr_err, 0 );
+ LDAP_XSTRING(bdb_modify) ": txn_begin failed: "
+ "%s (%d)\n", db_strerror(rs->sr_err), rs->sr_err, 0 );
rs->sr_err = LDAP_OTHER;
rs->sr_text = "internal error";
goto return_results;
if ( rs->sr_err != 0 ) {
Debug( LDAP_DEBUG_TRACE,
- "bdb_modify: dn2entry failed (%d)\n",
+ LDAP_XSTRING(bdb_modify) ": dn2entry failed (%d)\n",
rs->sr_err, 0, 0 );
switch( rs->sr_err ) {
case DB_LOCK_DEADLOCK:
rs->sr_ref = get_entry_referrals( op, e );
Debug( LDAP_DEBUG_TRACE,
- "bdb_modify: entry is referral\n",
+ LDAP_XSTRING(bdb_modify) ": entry is referral\n",
0, 0, 0 );
rs->sr_err = LDAP_REFERRAL;
goto retry;
} else if ( rc ) {
Debug( LDAP_DEBUG_TRACE,
- "bdb_modify: persistent search failed (%d,%d)\n",
+ LDAP_XSTRING(bdb_modify)
+ ": persistent search failed (%d,%d)\n",
rc, rs->sr_err, 0 );
}
}
&slap_pre_read_bv, preread_ctrl ) )
{
Debug( LDAP_DEBUG_TRACE,
- "<=- bdb_modify: pre-read failed!\n", 0, 0, 0 );
+ "<=- " LDAP_XSTRING(bdb_modify)
+ ": pre-read failed!\n", 0, 0, 0 );
goto return_results;
}
}
rs->sr_text = NULL;
if( rs->sr_err != 0 ) {
Debug( LDAP_DEBUG_TRACE,
- "bdb_modify: txn_begin(2) failed: %s (%d)\n",
+ LDAP_XSTRING(bdb_modify) ": txn_begin(2) failed: "
+ "%s (%d)\n",
db_strerror(rs->sr_err), rs->sr_err, 0 );
rs->sr_err = LDAP_OTHER;
rs->sr_text = "internal error";
if( rs->sr_err != LDAP_SUCCESS ) {
Debug( LDAP_DEBUG_TRACE,
- "bdb_modify: modify failed (%d)\n",
+ LDAP_XSTRING(bdb_modify) ": modify failed (%d)\n",
rs->sr_err, 0, 0 );
if ( (rs->sr_err == LDAP_INSUFFICIENT_ACCESS) && opinfo.boi_err ) {
rs->sr_err = opinfo.boi_err;
rs->sr_err = bdb_id2entry_update( op->o_bd, lt2, &dummy );
if ( rs->sr_err != 0 ) {
Debug( LDAP_DEBUG_TRACE,
- "bdb_modify: id2entry update failed (%d)\n",
- rs->sr_err, 0, 0 );
+ LDAP_XSTRING(bdb_modify) ": id2entry update failed "
+ "(%d)\n", rs->sr_err, 0, 0 );
switch( rs->sr_err ) {
case DB_LOCK_DEADLOCK:
case DB_LOCK_NOTGRANTED:
&slap_post_read_bv, postread_ctrl ) )
{
Debug( LDAP_DEBUG_TRACE,
- "<=- bdb_modify: post-read failed!\n", 0, 0, 0 );
+ "<=- " LDAP_XSTRING(bdb_modify)
+ ": post-read failed!\n", 0, 0, 0 );
goto return_results;
}
}
rc = bdb_psearch( op, rs, ps_list, e, LDAP_PSEARCH_BY_MODIFY );
if ( rc ) {
Debug( LDAP_DEBUG_TRACE,
- "bdb_modify: persistent search failed (%d,%d)\n",
+ LDAP_XSTRING(bdb_modify)
+ ": persistent search failed "
+ "(%d,%d)\n",
rc, rs->sr_err, 0 );
}
}
e, LDAP_PSEARCH_BY_SCOPEOUT);
if ( rc ) {
Debug( LDAP_DEBUG_TRACE,
- "bdb_modify: persistent search failed (%d,%d)\n",
+ LDAP_XSTRING(bdb_modify)
+ ": persistent search failed "
+ "(%d,%d)\n",
rc, rs->sr_err, 0 );
}
LDAP_LIST_REMOVE ( pm_list, ps_link );
if( rs->sr_err != 0 ) {
Debug( LDAP_DEBUG_TRACE,
- "bdb_modify: txn_%s failed: %s (%d)\n",
+ LDAP_XSTRING(bdb_modify) ": txn_%s failed: %s (%d)\n",
op->o_noop ? "abort (no-op)" : "commit",
db_strerror(rs->sr_err), rs->sr_err );
rs->sr_err = LDAP_OTHER;
}
Debug( LDAP_DEBUG_TRACE,
- "bdb_modify: updated%s id=%08lx dn=\"%s\"\n",
+ LDAP_XSTRING(bdb_modify) ": updated%s id=%08lx dn=\"%s\"\n",
op->o_noop ? " (no-op)" : "",
dummy.e_id, op->o_req_dn.bv_val );
ctrls[num_ctrls] = NULL;
- Debug( LDAP_DEBUG_TRACE, "==>bdb_modrdn(%s,%s,%s)\n",
+ Debug( LDAP_DEBUG_TRACE, "==>" LDAP_XSTRING(bdb_modrdn) "(%s,%s,%s)\n",
op->o_req_dn.bv_val,op->oq_modrdn.rs_newrdn.bv_val,
op->oq_modrdn.rs_newSup ? op->oq_modrdn.rs_newSup->bv_val : "NULL" );
bdb_unlocked_cache_return_entry_r(&bdb->bi_cache, np);
np = NULL;
}
- Debug( LDAP_DEBUG_TRACE, "==>bdb_modrdn: retrying...\n", 0, 0, 0 );
+ Debug( LDAP_DEBUG_TRACE, "==>" LDAP_XSTRING(bdb_modrdn)
+ ": retrying...\n", 0, 0, 0 );
pm_list = LDAP_LIST_FIRST(&op->o_pm_list);
while ( pm_list != NULL ) {
LDAP_LIST_REMOVE ( pm_list, ps_link );
rs->sr_text = NULL;
if( rs->sr_err != 0 ) {
Debug( LDAP_DEBUG_TRACE,
- "bdb_delete: txn_begin failed: %s (%d)\n",
- db_strerror(rs->sr_err), rs->sr_err, 0 );
+ LDAP_XSTRING(bdb_modrdn) ": txn_begin failed: "
+ "%s (%d)\n", db_strerror(rs->sr_err), rs->sr_err, 0 );
rs->sr_err = LDAP_OTHER;
rs->sr_text = "internal error";
goto return_results;
goto retry;
case 0:
Debug(LDAP_DEBUG_ARGS,
- "<=- bdb_modrdn: non-leaf %s\n",
+ "<=- " LDAP_XSTRING(bdb_modrdn)
+ ": non-leaf %s\n",
op->o_req_dn.bv_val, 0, 0);
rs->sr_err = LDAP_NOT_ALLOWED_ON_NONLEAF;
rs->sr_text = "subtree rename not supported";
break;
default:
Debug(LDAP_DEBUG_ARGS,
- "<=- bdb_modrdn: has_children failed: %s (%d)\n",
+ "<=- " LDAP_XSTRING(bdb_modrdn)
+ ": has_children failed: %s (%d)\n",
db_strerror(rs->sr_err), rs->sr_err, 0 );
rs->sr_err = LDAP_OTHER;
rs->sr_text = "internal error";
/* parent is a referral, don't allow add */
rs->sr_ref = get_entry_referrals( op, e );
- Debug( LDAP_DEBUG_TRACE, "bdb_modrdn: entry %s is referral\n",
- e->e_dn, 0, 0 );
+ Debug( LDAP_DEBUG_TRACE, LDAP_XSTRING(bdb_modrdn)
+ ": entry %s is referral\n", e->e_dn, 0, 0 );
rs->sr_err = LDAP_REFERRAL,
rs->sr_matched = e->e_name.bv_val;
p = eip->bei_e;
if( p == NULL) {
- Debug( LDAP_DEBUG_TRACE, "bdb_modrdn: parent does not exist\n",
- 0, 0, 0);
+ Debug( LDAP_DEBUG_TRACE, LDAP_XSTRING(bdb_modrdn)
+ ": parent does not exist\n", 0, 0, 0);
rs->sr_err = LDAP_OTHER;
rs->sr_text = "old entry's parent does not exist";
goto return_results;
}
Debug( LDAP_DEBUG_TRACE,
- "bdb_modrdn: wr to children of entry %s OK\n",
- p_ndn.bv_val, 0, 0 );
+ LDAP_XSTRING(bdb_modrdn) ": wr to children "
+ "of entry %s OK\n", p_ndn.bv_val, 0, 0 );
if ( p_ndn.bv_val == slap_empty_bv.bv_val ) {
p_dn = slap_empty_bv;
}
Debug( LDAP_DEBUG_TRACE,
- "bdb_modrdn: parent dn=%s\n",
+ LDAP_XSTRING(bdb_modrdn) ": parent dn=%s\n",
p_dn.bv_val, 0, 0 );
} else {
}
Debug( LDAP_DEBUG_TRACE,
- "bdb_modrdn: wr to children of entry \"\" OK\n",
+ LDAP_XSTRING(bdb_modrdn)
+ ": wr to children of entry \"\" OK\n",
0, 0, 0 );
p_dn.bv_val = "";
p_dn.bv_len = 0;
Debug( LDAP_DEBUG_TRACE,
- "bdb_modrdn: parent dn=\"\"\n",
+ LDAP_XSTRING(bdb_modrdn)
+ ": parent dn=\"\"\n",
0, 0, 0 );
} else {
Debug( LDAP_DEBUG_TRACE,
- "bdb_modrdn: no parent, not root "
+ LDAP_XSTRING(bdb_modrdn)
+ ": no parent, not root "
"& \"\" is not suffix\n",
0, 0, 0);
rs->sr_text = "no write access to old parent";
if ( op->oq_modrdn.rs_newSup != NULL ) {
Debug( LDAP_DEBUG_TRACE,
- "bdb_modrdn: new parent \"%s\" requested...\n",
+ LDAP_XSTRING(bdb_modrdn)
+ ": new parent \"%s\" requested...\n",
op->oq_modrdn.rs_newSup->bv_val, 0, 0 );
/* newSuperior == oldParent? */
if( np == NULL) {
Debug( LDAP_DEBUG_TRACE,
- "bdb_modrdn: newSup(ndn=%s) not here!\n",
+ LDAP_XSTRING(bdb_modrdn)
+ ": newSup(ndn=%s) not here!\n",
np_ndn->bv_val, 0, 0);
rs->sr_text = "new superior not found";
rs->sr_err = LDAP_OTHER;
}
Debug( LDAP_DEBUG_TRACE,
- "bdb_modrdn: wr to new parent OK np=%p, id=%ld\n",
+ LDAP_XSTRING(bdb_modrdn)
+ ": wr to new parent OK np=%p, id=%ld\n",
(void *) np, (long) np->e_id, 0 );
/* check newSuperior for "children" acl */
}
Debug( LDAP_DEBUG_TRACE,
- "bdb_modrdn: no wr to newSup children\n",
+ LDAP_XSTRING(bdb_modrdn)
+ ": no wr to newSup children\n",
0, 0, 0 );
rs->sr_text = "no write access to new superior's children";
rs->sr_err = LDAP_INSUFFICIENT_ACCESS;
if ( is_entry_alias( np ) ) {
/* parent is an alias, don't allow add */
- Debug( LDAP_DEBUG_TRACE, "bdb_modrdn: entry is alias\n",
+ Debug( LDAP_DEBUG_TRACE,
+ LDAP_XSTRING(bdb_modrdn)
+ ": entry is alias\n",
0, 0, 0 );
rs->sr_text = "new superior is an alias";
rs->sr_err = LDAP_ALIAS_PROBLEM;
if ( is_entry_referral( np ) ) {
/* parent is a referral, don't allow add */
- Debug( LDAP_DEBUG_TRACE, "bdb_modrdn: entry is referral\n",
+ Debug( LDAP_DEBUG_TRACE,
+ LDAP_XSTRING(bdb_modrdn)
+ ": entry is referral\n",
0, 0, 0 );
rs->sr_text = "new superior is a referral";
rs->sr_err = LDAP_OTHER;
}
Debug( LDAP_DEBUG_TRACE,
- "bdb_modrdn: wr to children of entry \"\" OK\n",
+ LDAP_XSTRING(bdb_modrdn)
+ ": wr to children "
+ "of entry \"\" OK\n",
0, 0, 0 );
} else {
Debug( LDAP_DEBUG_TRACE,
- "bdb_modrdn: new superior=\"\", not root "
+ LDAP_XSTRING(bdb_modrdn)
+ ": new superior=\"\", not root "
"& \"\" is not suffix\n",
- 0, 0, 0);
+ 0, 0, 0 );
rs->sr_text = "no write access to new superior's children";
rs->sr_err = LDAP_INSUFFICIENT_ACCESS;
goto return_results;
}
Debug( LDAP_DEBUG_TRACE,
- "bdb_modrdn: new superior=\"\"\n",
+ LDAP_XSTRING(bdb_modrdn)
+ ": new superior=\"\"\n",
0, 0, 0 );
}
Debug( LDAP_DEBUG_TRACE,
- "bdb_modrdn: wr to new parent's children OK\n",
+ LDAP_XSTRING(bdb_modrdn)
+ ": wr to new parent's children OK\n",
0, 0, 0 );
new_parent_dn = np_dn;
ber_dupbv( &new_ndn, &bv );
}
- Debug( LDAP_DEBUG_TRACE, "bdb_modrdn: new ndn=%s\n",
+ Debug( LDAP_DEBUG_TRACE, LDAP_XSTRING(bdb_modrdn) ": new ndn=%s\n",
new_ndn.bv_val, 0, 0 );
/* Shortcut the search */
(char **)&rs->sr_text, LDAP_DN_FORMAT_LDAP, op->o_tmpmemctx ) )
{
Debug( LDAP_DEBUG_TRACE,
- "bdb_modrdn: can't figure out "
+ LDAP_XSTRING(bdb_modrdn) ": can't figure out "
"type(s)/values(s) of newrdn\n",
0, 0, 0 );
rs->sr_err = LDAP_INVALID_DN_SYNTAX;
}
Debug( LDAP_DEBUG_TRACE,
- "bdb_modrdn: new_rdn_type=\"%s\", new_rdn_val=\"%s\"\n",
- new_rdn[ 0 ]->la_attr.bv_val, new_rdn[ 0 ]->la_value.bv_val, 0 );
+ LDAP_XSTRING(bdb_modrdn)
+ ": new_rdn_type=\"%s\", new_rdn_val=\"%s\"\n",
+ new_rdn[ 0 ]->la_attr.bv_val,
+ new_rdn[ 0 ]->la_value.bv_val, 0 );
if ( op->oq_modrdn.rs_deleteoldrdn ) {
if ( !old_rdn && ldap_bv2rdn_x( &op->o_req_dn, &old_rdn,
(char **)&rs->sr_text, LDAP_DN_FORMAT_LDAP, op->o_tmpmemctx ) )
{
Debug( LDAP_DEBUG_TRACE,
- "bdb_modrdn: can't figure out "
+ LDAP_XSTRING(bdb_modrdn) ": can't figure out "
"the old_rdn type(s)/value(s)\n",
0, 0, 0 );
rs->sr_err = LDAP_OTHER;
&slap_pre_read_bv, preread_ctrl ) )
{
Debug( LDAP_DEBUG_TRACE,
- "<=- bdb_modrdn: post-read failed!\n", 0, 0, 0 );
+ "<=- " LDAP_XSTRING(bdb_modrdn)
+ ": post-read failed!\n", 0, 0, 0 );
goto return_results;
}
}
rs->sr_text = NULL;
if( rs->sr_err != 0 ) {
Debug( LDAP_DEBUG_TRACE,
- "bdb_modrdn: txn_begin(2) failed: %s (%d)\n",
+ LDAP_XSTRING(bdb_modrdn)
+ ": txn_begin(2) failed: %s (%d)\n",
db_strerror(rs->sr_err), rs->sr_err, 0 );
rs->sr_err = LDAP_OTHER;
rs->sr_text = "internal error";
rs->sr_err = bdb_dn2id_delete( op, lt2, eip, e );
if ( rs->sr_err != 0 ) {
Debug(LDAP_DEBUG_TRACE,
- "<=- bdb_modrdn: dn2id del failed: %s (%d)\n",
+ "<=- " LDAP_XSTRING(bdb_modrdn)
+ ": dn2id del failed: %s (%d)\n",
db_strerror(rs->sr_err), rs->sr_err, 0 );
switch( rs->sr_err ) {
case DB_LOCK_DEADLOCK:
rs->sr_err = bdb_dn2id_add( op, lt2, neip ? neip : eip, &dummy );
if ( rs->sr_err != 0 ) {
Debug(LDAP_DEBUG_TRACE,
- "<=- bdb_modrdn: dn2id add failed: %s (%d)\n",
+ "<=- " LDAP_XSTRING(bdb_modrdn)
+ ": dn2id add failed: %s (%d)\n",
db_strerror(rs->sr_err), rs->sr_err, 0 );
switch( rs->sr_err ) {
case DB_LOCK_DEADLOCK:
rc = bdb_psearch( op, rs, ps_list, &dummy, LDAP_PSEARCH_BY_PREMODIFY );
if ( rc ) {
Debug( LDAP_DEBUG_TRACE,
- "bdb_modrdn: persistent search failed (%d,%d)\n",
+ LDAP_XSTRING(bdb_modrdn)
+ ": persistent search failed (%d,%d)\n",
rc, rs->sr_err, 0 );
}
}
&rs->sr_text, textbuf, textlen );
if( rs->sr_err != LDAP_SUCCESS ) {
Debug(LDAP_DEBUG_TRACE,
- "<=- bdb_modrdn: modify failed: %s (%d)\n",
+ "<=- " LDAP_XSTRING(bdb_modrdn)
+ ": modify failed: %s (%d)\n",
db_strerror(rs->sr_err), rs->sr_err, 0 );
if ( ( rs->sr_err == LDAP_INSUFFICIENT_ACCESS ) && opinfo.boi_err ) {
rs->sr_err = opinfo.boi_err;
rs->sr_err = bdb_id2entry_update( op->o_bd, lt2, &dummy );
if ( rs->sr_err != 0 ) {
Debug(LDAP_DEBUG_TRACE,
- "<=- bdb_modrdn: id2entry failed: %s (%d)\n",
+ "<=- " LDAP_XSTRING(bdb_modrdn)
+ ": id2entry failed: %s (%d)\n",
db_strerror(rs->sr_err), rs->sr_err, 0 );
switch( rs->sr_err ) {
case DB_LOCK_DEADLOCK:
break;
default:
Debug(LDAP_DEBUG_ARGS,
- "<=- bdb_modrdn: has_children failed: %s (%d)\n",
+ "<=- " LDAP_XSTRING(bdb_modrdn)
+ ": has_children failed: %s (%d)\n",
db_strerror(rs->sr_err), rs->sr_err, 0 );
rs->sr_err = LDAP_OTHER;
rs->sr_text = "internal error";
&slap_post_read_bv, postread_ctrl ) )
{
Debug( LDAP_DEBUG_TRACE,
- "<=- bdb_modrdn: post-read failed!\n", 0, 0, 0 );
+ "<=- " LDAP_XSTRING(bdb_modrdn)
+ ": post-read failed!\n", 0, 0, 0 );
goto return_results;
}
}
rc = bdb_psearch( op, rs, ps_list, e, LDAP_PSEARCH_BY_MODIFY );
if ( rc ) {
Debug( LDAP_DEBUG_TRACE,
- "bdb_modrdn: persistent search failed (%d,%d)\n",
+ LDAP_XSTRING(bdb_modrdn)
+ ": persistent search failed "
+ "(%d,%d)\n",
rc, rs->sr_err, 0 );
}
}
e, LDAP_PSEARCH_BY_SCOPEOUT);
if ( rc ) {
Debug( LDAP_DEBUG_TRACE,
- "bdb_modrdn: persistent search failed (%d,%d)\n",
+ LDAP_XSTRING(bdb_modrdn)
+ ": persistent search failed "
+ "(%d,%d)\n",
rc, rs->sr_err, 0 );
}
pm_prev = pm_list;
op->o_private = NULL;
if( rs->sr_err != LDAP_SUCCESS ) {
- Debug( LDAP_DEBUG_TRACE, "bdb_modrdn: %s : %s (%d)\n",
+ Debug( LDAP_DEBUG_TRACE,
+ LDAP_XSTRING(bdb_modrdn) ": %s : %s (%d)\n",
rs->sr_text, db_strerror(rs->sr_err), rs->sr_err );
rs->sr_err = LDAP_OTHER;
}
Debug(LDAP_DEBUG_TRACE,
- "bdb_modrdn: rdn modified%s id=%08lx dn=\"%s\"\n",
+ LDAP_XSTRING(bdb_modrdn)
+ ": rdn modified%s id=%08lx dn=\"%s\"\n",
op->o_noop ? " (no-op)" : "",
dummy.e_id, op->o_req_dn.bv_val );
rs->sr_text = NULL;
default:
Debug(LDAP_DEBUG_ARGS,
- "<=- bdb_hasSubordinates: has_children failed: %s (%d)\n",
+ "<=- " LDAP_XSTRING(bdb_hasSubordinates)
+ ": has_children failed: %s (%d)\n",
db_strerror(rc), rc, 0 );
rc = LDAP_OTHER;
}
#ifdef BDB_HIER
#define BDB_SYMBOL(x) LDAP_CONCAT(hdb_,x)
+#define BDB_UCTYPE "HDB"
#else
#define BDB_SYMBOL(x) LDAP_CONCAT(bdb_,x)
+#define BDB_UCTYPE "BDB"
#endif
/*
goto dn2entry_retry;
default:
Debug( LDAP_DEBUG_TRACE,
- "bdb_referrals: dn2entry failed: %s (%d)\n",
+ LDAP_XSTRING(bdb_referrals)
+ ": dn2entry failed: %s (%d)\n",
db_strerror(rc), rc, 0 );
send_ldap_error( op, rs, LDAP_OTHER, "internal error" );
LOCK_ID_FREE ( bdb->bi_dbenv, locker );
rs->sr_matched = NULL;
if ( e != NULL ) {
Debug( LDAP_DEBUG_TRACE,
- "bdb_referrals: op=%ld target=\"%s\" matched=\"%s\"\n",
+ LDAP_XSTRING(bdb_referrals)
+ ": op=%ld target=\"%s\" matched=\"%s\"\n",
(long) op->o_tag, op->o_req_dn.bv_val, e->e_name.bv_val );
if( is_entry_referral( e ) ) {
refs, &e->e_name, &op->o_req_dn, LDAP_SCOPE_DEFAULT );
Debug( LDAP_DEBUG_TRACE,
- "bdb_referrals: op=%ld target=\"%s\" matched=\"%s\"\n",
+ LDAP_XSTRING(bdb_referrals)
+ ": op=%ld target=\"%s\" matched=\"%s\"\n",
(long) op->o_tag, op->o_req_dn.bv_val, e->e_name.bv_val );
rs->sr_matched = e->e_name.bv_val;
struct bdb_op_info *opinfo = NULL;
DB_TXN *ltid = NULL;
- Debug( LDAP_DEBUG_TRACE, "=> bdb_search\n", 0, 0, 0);
+ Debug( LDAP_DEBUG_TRACE, "=> " LDAP_XSTRING(bdb_search) "\n", 0, 0, 0);
attrs = sop->oq_search.rs_attrs;
opinfo = (struct bdb_op_info *) op->o_private;
ber_bvarray_free( erefs );
}
- Debug( LDAP_DEBUG_TRACE, "bdb_search: entry is referral\n",
+ Debug( LDAP_DEBUG_TRACE,
+ LDAP_XSTRING(bdb_search) ": entry is referral\n",
0, 0, 0 );
if (!rs->sr_ref) rs->sr_text = "bad_referral object";
}
if ( candidates[0] == 0 ) {
- Debug( LDAP_DEBUG_TRACE, "bdb_search: no candidates\n",
+ Debug( LDAP_DEBUG_TRACE,
+ LDAP_XSTRING(bdb_search) ": no candidates\n",
0, 0, 0 );
goto nochange;
if ( cursor == NOID ) {
Debug( LDAP_DEBUG_TRACE,
- "bdb_search: no paged results candidates\n",
+ LDAP_XSTRING(bdb_search)
+ ": no paged results candidates\n",
0, 0, 0 );
send_paged_response( sop, rs, &lastid, 0 );
} else if( !BDB_IDL_IS_RANGE(candidates) ) {
/* only complain for non-range IDLs */
Debug( LDAP_DEBUG_TRACE,
- "bdb_search: candidate %ld not found\n",
+ LDAP_XSTRING(bdb_search)
+ ": candidate %ld not found\n",
(long) id, 0, 0 );
}
/* Not in scope, ignore it */
if ( !IS_POST_SEARCH && !scopeok ) {
Debug( LDAP_DEBUG_TRACE,
- "bdb_search: %ld scope not okay\n",
+ LDAP_XSTRING(bdb_search)
+ ": %ld scope not okay\n",
(long) id, 0, 0 );
goto loop_continue;
}
if ( rc_sync == LDAP_COMPARE_TRUE ) {
if ( no_sync_state_change ) {
Debug( LDAP_DEBUG_TRACE,
- "bdb_search: "
+ LDAP_XSTRING(bdb_search) ": "
"error in context csn management\n",
0, 0, 0 );
}
} else {
Debug( LDAP_DEBUG_TRACE,
- "bdb_search: invalid ps_type (%d) \n",
+ LDAP_XSTRING(bdb_search)
+ ": invalid ps_type (%d) \n",
ps_type, 0, 0);
}
} else {
Debug( LDAP_DEBUG_TRACE,
- "bdb_search: %ld does not match filter\n",
+ LDAP_XSTRING(bdb_search)
+ ": %ld does not match filter\n",
(long) id, 0, 0 );
}
rc = db->get( db, NULL, &key, &data, bdb->bi_db_opflags );
if( rc != 0 ) {
- Debug( LDAP_DEBUG_TRACE, "bdb_tool_dn2id_get: get failed: %s (%d)\n",
+ Debug( LDAP_DEBUG_TRACE, LDAP_XSTRING(bdb_tool_dn2id_get)
+ ": get failed: %s (%d)\n",
db_strerror( rc ), rc, 0 );
id = NOID;
}
assert( text->bv_val );
assert( text->bv_val[0] == '\0' ); /* overconservative? */
- Debug( LDAP_DEBUG_TRACE, "=> bdb_tool_entry_put( %ld, \"%s\" )\n",
- (long) e->e_id, e->e_dn, 0 );
+ Debug( LDAP_DEBUG_TRACE, "=> " LDAP_XSTRING(bdb_tool_entry_put)
+ "( %ld, \"%s\" )\n", (long) e->e_id, e->e_dn, 0 );
rc = TXN_BEGIN( bdb->bi_dbenv, NULL, &tid,
bdb->bi_db_opflags );
"txn_begin failed: %s (%d)",
db_strerror(rc), rc );
Debug( LDAP_DEBUG_ANY,
- "=> bdb_tool_entry_put: %s\n",
+ "=> " LDAP_XSTRING(bdb_tool_entry_put) ": %s\n",
text->bv_val, 0, 0 );
return NOID;
}
"id2entry_add failed: %s (%d)",
db_strerror(rc), rc );
Debug( LDAP_DEBUG_ANY,
- "=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 );
+ "=> " LDAP_XSTRING(bdb_tool_entry_put) ": %s\n",
+ text->bv_val, 0, 0 );
goto done;
}
"index_entry_add failed: %s (%d)",
db_strerror(rc), rc );
Debug( LDAP_DEBUG_ANY,
- "=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 );
+ "=> " LDAP_XSTRING(bdb_tool_entry_put) ": %s\n",
+ text->bv_val, 0, 0 );
goto done;
}
"txn_commit failed: %s (%d)",
db_strerror(rc), rc );
Debug( LDAP_DEBUG_ANY,
- "=> bdb_tool_entry_put: %s\n",
+ "=> " LDAP_XSTRING(bdb_tool_entry_put) ": %s\n",
text->bv_val, 0, 0 );
e->e_id = NOID;
}
"txn_aborted! %s (%d)",
db_strerror(rc), rc );
Debug( LDAP_DEBUG_ANY,
- "=> bdb_tool_entry_put: %s\n",
+ "=> " LDAP_XSTRING(bdb_tool_entry_put) ": %s\n",
text->bv_val, 0, 0 );
e->e_id = NOID;
}
DB_TXN *tid = NULL;
Operation op = {0};
- Debug( LDAP_DEBUG_ARGS, "=> bdb_tool_entry_reindex( %ld )\n",
+ Debug( LDAP_DEBUG_ARGS,
+ "=> " LDAP_XSTRING(bdb_tool_entry_reindex) "( %ld )\n",
(long) id, 0, 0 );
/* No indexes configured, nothing to do. Could return an
if( e == NULL ) {
Debug( LDAP_DEBUG_ANY,
- "bdb_tool_entry_reindex:: could not locate id=%ld\n",
+ LDAP_XSTRING(bdb_tool_entry_reindex)
+ ": could not locate id=%ld\n",
(long) id, 0, 0 );
return -1;
}
rc = TXN_BEGIN( bi->bi_dbenv, NULL, &tid, bi->bi_db_opflags );
if( rc != 0 ) {
Debug( LDAP_DEBUG_ANY,
- "=> bdb_tool_entry_reindex: txn_begin failed: %s (%d)\n",
+ "=> " LDAP_XSTRING(bdb_tool_entry_reindex) ": "
+ "txn_begin failed: %s (%d)\n",
db_strerror(rc), rc, 0 );
goto done;
}
*
*/
- Debug( LDAP_DEBUG_TRACE, "=> bdb_tool_entry_reindex( %ld, \"%s\" )\n",
+ Debug( LDAP_DEBUG_TRACE,
+ "=> " LDAP_XSTRING(bdb_tool_entry_reindex) "( %ld, \"%s\" )\n",
(long) id, e->e_dn, 0 );
op.o_bd = be;
rc = bdb_dn2id_add( &op, tid, NULL, e );
if( rc != 0 && rc != DB_KEYEXIST ) {
Debug( LDAP_DEBUG_ANY,
- "=> bdb_tool_entry_reindex: dn2id_add failed: %s (%d)\n",
+ "=> " LDAP_XSTRING(bdb_tool_entry_reindex)
+ ": dn2id_add failed: %s (%d)\n",
db_strerror(rc), rc, 0 );
goto done;
}
rc = TXN_COMMIT( tid, 0 );
if( rc != 0 ) {
Debug( LDAP_DEBUG_ANY,
- "=> bdb_tool_entry_reindex: txn_commit failed: %s (%d)\n",
+ "=> " LDAP_XSTRING(bdb_tool_entry_reindex)
+ ": txn_commit failed: %s (%d)\n",
db_strerror(rc), rc, 0 );
e->e_id = NOID;
}
} else {
TXN_ABORT( tid );
Debug( LDAP_DEBUG_ANY,
- "=> bdb_tool_entry_reindex: txn_aborted! %s (%d)\n",
+ "=> " LDAP_XSTRING(bdb_tool_entry_reindex)
+ ": txn_aborted! %s (%d)\n",
db_strerror(rc), rc, 0 );
e->e_id = NOID;
}
assert ( e->e_id != NOID );
assert ( e->e_id != 0 );
- Debug( LDAP_DEBUG_TRACE, "=> bdb_tool_entry_put( %ld, \"%s\" )\n",
+ Debug( LDAP_DEBUG_TRACE,
+ "=> " LDAP_XSTRING(bdb_tool_entry_modify) "( %ld, \"%s\" )\n",
(long) e->e_id, e->e_dn, 0 );
rc = TXN_BEGIN( bdb->bi_dbenv, NULL, &tid,
"txn_begin failed: %s (%d)",
db_strerror(rc), rc );
Debug( LDAP_DEBUG_ANY,
- "=> bdb_tool_entry_put: %s\n",
+ "=> " LDAP_XSTRING(bdb_tool_entry_modify) ": %s\n",
text->bv_val, 0, 0 );
return NOID;
}
"id2entry_add failed: %s (%d)",
db_strerror(rc), rc );
Debug( LDAP_DEBUG_ANY,
- "=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 );
+ "=> " LDAP_XSTRING(bdb_tool_entry_modify) ": %s\n",
+ text->bv_val, 0, 0 );
goto done;
}
"index_entry_del failed: %s (%d)",
db_strerror(rc), rc );
Debug( LDAP_DEBUG_ANY,
- "=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 );
+ "=> " LDAP_XSTRING(bdb_tool_entry_modify) ": %s\n",
+ text->bv_val, 0, 0 );
goto done;
}
"index_entry_add failed: %s (%d)",
db_strerror(rc), rc );
Debug( LDAP_DEBUG_ANY,
- "=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 );
+ "=> " LDAP_XSTRING(bdb_tool_entry_modify) ": %s\n",
+ text->bv_val, 0, 0 );
goto done;
}
"txn_commit failed: %s (%d)",
db_strerror(rc), rc );
Debug( LDAP_DEBUG_ANY,
- "=> bdb_tool_entry_put: %s\n",
- text->bv_val, 0, 0 );
+ "=> " LDAP_XSTRING(bdb_tool_entry_modify) ": "
+ "%s\n", text->bv_val, 0, 0 );
e->e_id = NOID;
}
"txn_aborted! %s (%d)",
db_strerror(rc), rc );
Debug( LDAP_DEBUG_ANY,
- "=> bdb_tool_entry_put: %s\n",
+ "=> " LDAP_XSTRING(bdb_tool_entry_modify) ": %s\n",
text->bv_val, 0, 0 );
e->e_id = NOID;
}