struct bdb_info *bdb = (struct bdb_info *) be->be_private;
DB *db = bdb->bi_dn2id->bdi_db;
- Debug( LDAP_DEBUG_TRACE, "=> bdb_dn2id_add( \"%s\", %ld )\n", dn, id, 0 );
+ Debug( LDAP_DEBUG_TRACE, "=> bdb_dn2id_add( \"%s\", 0x%08lx )\n",
+ dn, id, 0 );
assert( id != NOID );
DBTzero( &key );
struct bdb_info *bdb = (struct bdb_info *) be->be_private;
DB *db = bdb->bi_dn2id->bdi_db;
- Debug( LDAP_DEBUG_TRACE, "=> bdb_dn2id_delete( \"%s\", %ld )\n", dn, id, 0 );
+ Debug( LDAP_DEBUG_TRACE, "=> bdb_dn2id_delete( \"%s\", 0x%08lx )\n",
+ dn, id, 0 );
DBTzero( &key );
key.size = strlen( dn ) + 2;
/* fetch it */
rc = db->get( db, txn, &key, &data, 0 );
- Debug( LDAP_DEBUG_TRACE, "<= bdb_dn2id: id=%ld: %s (%d)\n",
+ Debug( LDAP_DEBUG_TRACE, "<= bdb_dn2id: id=0x%08lx: %s (%d)\n",
id, db_strerror( rc ), rc );
ch_free( key.data );
while(1) {
AC_MEMCPY( &((char *)key.data)[1], dn, key.size - 1 );
+ *id = NOID;
+
/* fetch it */
rc = db->get( db, txn, &key, &data, 0 );
tmp = NULL;
if( pdn == NULL || *pdn == '\0' ) {
+ Debug( LDAP_DEBUG_TRACE,
+ "<= bdb_dn2id_matched: no match\n",
+ 0, 0, 0 );
ch_free( pdn );
break;
}
key.size = strlen( dn ) + 2;
} else if ( rc == 0 ) {
+ if( data.size != sizeof( ID ) ) {
+ Debug( LDAP_DEBUG_ANY,
+ "<= bdb_dn2id_matched: get size mismatch: "
+ "expected %ld, got %ld\n",
+ (long) sizeof(ID), (long) data.size, 0 );
+ ch_free( tmp );
+ }
+
if( in != dn ) {
*matchedDN = (char *) dn;
}
+
Debug( LDAP_DEBUG_TRACE,
- "<= bdb_dn2id_matched: id=%ld: %s\n",
- id, dn, 0 );
+ "<= bdb_dn2id_matched: id=0x%08lx: %s\n",
+ *id, dn, 0 );
break;
} else {
+ Debug( LDAP_DEBUG_ANY,
+ "<= bdb_dn2id_matched: get failed: %s (%d)\n",
+ db_strerror(rc), rc, 0 );
ch_free( tmp );
break;
}
Entry *e,
ID *ids )
{
- Debug(LDAP_DEBUG_TRACE, "base_candidates: base: \"%s\" (0x08lx)\n",
+ Debug(LDAP_DEBUG_ARGS, "base_candidates: base: \"%s\" (0x%08lx)\n",
e->e_dn, (long) e->e_id, 0);
ids[0] = 1;
int manageDSAit,
ID *ids )
{
- Debug(LDAP_DEBUG_TRACE, "subtree_candidates: base: \"%s\" (0x08lx)\n",
+ Debug(LDAP_DEBUG_TRACE, "subtree_candidates: base: \"%s\" (0x%08lx)\n",
e->e_dn, (long) e->e_id, 0);
ids[0] = NOID;