attr_mask( be->be_private, at->sat_ad, &mask );
- if( mask & SLAP_INDEX_AUTO_SUBTYPES ) {
- *atname = desc->ad_type->sat_cname;
- *dbname = at->sat_cname.bv_val;
- return mask;
- }
-
if( mask && ( mask ^ SLAP_INDEX_NOSUBTYPES ) ) {
*atname = at->sat_cname;
*dbname = at->sat_cname.bv_val;
Backend *be,
AttributeDescription *desc )
{
- int rc;
slap_mask_t mask;
char *dbname;
struct berval prefix;
return LDAP_INAPPROPRIATE_MATCHING;
}
- return LDAP_SUCCESS;
+ return LDAP_SUCCESS;
}
int index_param(
if ( db == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "index", LDAP_LEVEL_ERR,
- "index_read: Could not open db %s%s\n",
- dbname, LDBM_SUFFIX ));
+ LDAP_LOG( INDEX, ERR,
+ "index_read: Could not open db %s%s\n", dbname, LDBM_SUFFIX, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"<= index_read NULL (could not open %s%s)\n",
struct berval *lang,
BerVarray vals,
ID id,
- int op,
- char ** dbnamep,
- slap_mask_t *maskp )
+ int op )
{
slap_mask_t mask = 0;
- slap_mask_t tmpmask = 0;
if( type->sat_sup ) {
/* recurse */
(void) index_at_values( be,
type->sat_sup, lang,
- vals, id, op,
- dbnamep, &tmpmask );
+ vals, id, op );
}
/* If this type has no AD, we've never used it before */
}
if( mask ) {
- *dbnamep = type->sat_cname.bv_val;
- } else if ( tmpmask & SLAP_INDEX_AUTO_SUBTYPES ) {
- mask = tmpmask;
- }
-
- if( mask ) {
- indexer( be, *dbnamep,
+ indexer( be, type->sat_cname.bv_val,
&type->sat_cname,
vals, id, op,
mask );
- if ( mask & SLAP_INDEX_AUTO_SUBTYPES ) {
- *maskp = mask;
- }
}
if( lang->bv_len ) {
- char *dbname = NULL;
- struct berval lname;
AttributeDescription *desc;
- tmpmask = 0;
- lname.bv_val = NULL;
+ mask = 0;
desc = ad_find_lang(type, lang);
if( desc ) {
- attr_mask( be->be_private, desc, &tmpmask );
+ attr_mask( be->be_private, desc, &mask );
}
- if( tmpmask ) {
- dbname = desc->ad_cname.bv_val;
- lname = desc->ad_cname;
- mask = tmpmask;
- }
-
- if( dbname != NULL ) {
- indexer( be, dbname, &lname,
+ if( mask ) {
+ indexer( be, desc->ad_cname.bv_val, &desc->ad_cname,
vals, id, op,
mask );
- if( !tmpmask ) {
- ch_free( lname.bv_val );
- }
}
}
ID id,
int op )
{
- char *dbname = NULL;
- slap_mask_t mask;
-
(void) index_at_values( be,
desc->ad_type, &desc->ad_lang,
- vals, id, op,
- &dbname, &mask );
+ vals, id, op );
return LDAP_SUCCESS;
}
Attribute *ap )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "index", LDAP_LEVEL_ENTRY,
- "index_entry: %s (%s)%ld\n",
- op == SLAP_INDEX_ADD_OP ? "add" : "del",
- e->e_dn, e->e_id ));
+ LDAP_LOG( INDEX, ENTRY,
+ "index_entry: %s (%s)%ld\n", op == SLAP_INDEX_ADD_OP ? "add" : "del",
+ e->e_dn, e->e_id );
#else
Debug( LDAP_DEBUG_TRACE, "=> index_entry_%s( %ld, \"%s\" )\n",
op == SLAP_INDEX_ADD_OP ? "add" : "del",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "index", LDAP_LEVEL_ENTRY,
- "index_entry: success\n" ));
+ LDAP_LOG( INDEX, ENTRY, "index_entry: success\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "<= index_entry_%s( %ld, \"%s\" ) success\n",
op == SLAP_INDEX_ADD_OP ? "add" : "del",