From: Howard Chu Date: Mon, 14 Jan 2002 20:26:51 +0000 (+0000) Subject: Fix previous commit X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~133 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f4cfb13f2ccb5d3224d8eff5955c18092a9e0197;p=openldap Fix previous commit --- diff --git a/servers/slapd/back-bdb/index.c b/servers/slapd/back-bdb/index.c index eff91a3255..c42beef611 100644 --- a/servers/slapd/back-bdb/index.c +++ b/servers/slapd/back-bdb/index.c @@ -57,11 +57,17 @@ static slap_mask_t index_mask( bdb_attr_mask( be->be_private, at->sat_ad, &mask ); - if ( mask && ( mask ^ SLAP_INDEX_NOSUBTYPES ) ) { + 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; + return mask; + } } return 0; @@ -291,8 +297,9 @@ static int index_at_values( if( mask ) { *dbnamep = type->sat_cname.bv_val; - } else if ( tmpmask ^ SLAP_INDEX_NOSUBTYPES ) { + } else if ( tmpmask & SLAP_INDEX_AUTO_SUBTYPES ) { mask = tmpmask; + *maskp = mask; } if( mask ) { @@ -302,7 +309,6 @@ static int index_at_values( mask ); if( rc ) return rc; - *maskp = mask; } if( lang->bv_len ) { diff --git a/servers/slapd/back-ldbm/index.c b/servers/slapd/back-ldbm/index.c index 65347d8e77..8bfc8da2f3 100644 --- a/servers/slapd/back-ldbm/index.c +++ b/servers/slapd/back-ldbm/index.c @@ -54,11 +54,17 @@ static slap_mask_t index_mask( attr_mask( be->be_private, at->sat_ad, &mask ); - if( mask && ( mask ^ SLAP_INDEX_NOSUBTYPES ) ) { + 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; + return mask; + } } return 0; @@ -257,8 +263,9 @@ static int index_at_values( if( mask ) { *dbnamep = type->sat_cname.bv_val; - } else if ( tmpmask ^ SLAP_INDEX_NOSUBTYPES ) { + } else if ( tmpmask & SLAP_INDEX_AUTO_SUBTYPES ) { mask = tmpmask; + *maskp = mask; } if( mask ) { @@ -266,7 +273,6 @@ static int index_at_values( &type->sat_cname, vals, id, op, mask ); - *maskp = mask; } if( lang->bv_len ) {